หน้า 1 จากทั้งหมด 1

วิธีแก้ปัญหา Unittest Warning: require_once(PHP/CodeCoverage/Filter.php): failed

โพสต์แล้ว: 21/11/2012 5:49 pm
โดย mindphp
จากบทความ

วิธีติดตั้ง phpunit

วันนี้เจอปัญหา อยู่ๆ phpunit หรือเจ้า unit test ทำงานไม่ได้
เพราะ เปลี่ยน เวอร์ชั่นของ xampp
พอจะใช้ unit test เช็ค functional test เจอปัญหาตามนี้

โค้ด: เลือกทั้งหมด

D:\xampp\php>phpunit
Warning: require_once(PHP/CodeCoverage/Filter.php): failed to open stream: No su
ch file or directory in D:\xampp\php\phpunit on line 38

Fatal error: require_once(): Failed opening required 'PHP/CodeCoverage/Filter.ph
p' (include_path='.;D:\xampp\php\PEAR') in D:\xampp\php\phpunit on line 38

ทางแก้คือ ให้ทำการอัพเดด Pear ใหม่
แต่เมืออัพแดด pear แล้วยังเจอปัญหา

phpunit Fatal error: Call to undefined method PHP_CodeCoverage_Filter::getInstance() in

ให้แก้ โดย force install ใหม่ ด้วย packet ใหม่เลย

โค้ด: เลือกทั้งหมด

#pear channel-discover pear.phpunit.de

#pear channel-discover pear.symfony-project.com

#pear channel-discover components.ez.no

#pear update-channels

#pear upgrade-all

#pear install --alldeps phpunit/PHPUnit

#pear install --force --alldeps phpunit/PHPUnit
รอซักพัก phpunit เราก็จะกลับมาใช้งานได้เหมือนเดิม :-D :-D

Re: วิธีแก้ปัญหา Unittest Warning: require_once(PHP/CodeCoverage/Filter.php): failed

โพสต์แล้ว: 01/04/2013 11:20 am
โดย ople
Help me pless

Re: วิธีแก้ปัญหา Unittest Warning: require_once(PHP/CodeCoverage/Filter.php): failed

โพสต์แล้ว: 24/11/2022 4:46 pm
โดย บุคคลทั่วไป
ใช้ phpunit หรือ selenium ดีกว่ากันเขียนเป็นแต่ PHP