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

สำหรับผู้ที่ เริ่มต้น Programming - PHP มีอะไร แนะนำ หรือข้อสงสัยต้องบอร์ด นี้ คนที่มีความรู้ แบ่งปันคนอื่นบ้างนะ ปัญหาการเขียนโปรแกรม แบบ OOP Session Cookies php network

Moderator: mindphp, ผู้ดูแลกระดาน

ภาพประจำตัวสมาชิก
mindphp
ผู้ดูแลระบบ MindPHP
ผู้ดูแลระบบ MindPHP
โพสต์: 41232
ลงทะเบียนเมื่อ: 22/09/2008 6:18 pm
ติดต่อ:

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

โพสต์ที่ยังไม่ได้อ่าน โดย 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
ติดตาม VDO: http://www.youtube.com/c/MindphpVideoman
ติดตาม FB: https://www.facebook.com/pages/MindphpC ... 9517401606
หมวดแชร์ความรู้: https://www.mindphp.com/forums/viewforum.php?f=29
รับอบรม และพัฒนาระบบ: https://www.mindphp.com/forums/viewtopic.php?f=6&t=2042
บุคคลทั่วไป

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

โพสต์ที่ยังไม่ได้อ่าน โดย บุคคลทั่วไป »

ใช้ phpunit หรือ selenium ดีกว่ากันเขียนเป็นแต่ PHP
ตอบกลับโพส
  • Similar Topics
    ตอบกลับ
    แสดง
    โพสต์ล่าสุด

ผู้ใช้งานขณะนี้

สมาชิกกำลังดูบอร์ดนี้: ไม่มีสมาชิกใหม่ และบุคลทั่วไป 111