PHPNotice: Pleasenolongerinclude "PHPUnit/Framework. php". Solution

Source: Internet
Author: User
Tags channel pear
PHPNotice: PleasenolongerincludePHPUnitFramework. php. solution: When you are studying the unit test in Yii Framework, the following error always occurs when you run the "phpunit/DBTest. php" command,

PHP Notice: Please no longer include "PHPUnit/Framework. php". in/usr/share/php/PHPUnit/Framework. php on line 50

However, I installed the PHPUnit package according to the document. later I found that one of the dependency packages had an error during the installation process due to network problems at home, however, all the other packages indicate that the installation is successful. then, you re-install the failed package PHP_CodeCoverage, and the above error occurs when you run the unit, so you slowly find out, after the following steps are performed, the problem is finally solved.

1. open the auto_discover option of pear.

$ Sudo pear config-set auto_discover 12. check the installed phpunit and its dependent packages.

$ Sudo pear list-a Installed packages, channel pear.phpunit.de: ========================================================== === Package Version State DbUnit 1.0.3 stable release 1.2.6 stable PHPUnit 3.5.15 stable release 1.0.9 stable release 1.0.3 stable release 1.0.5 stable PHP_Timer 1.0.2 stable release 1.0.1 stable Text_Template 1.1.0 stable3. uninstall all consumer channels phpunit-related packages, there is a sequence here, and there will be a prompt when uninstalling

$ Sudo pear uninstall PHPUnit $ sudo pear uninstall PHPUnit_MockObject... 4. reinstall the PHPUnit package

$ Sudo pear install pear.phpunit.de/PHPUnit5. run "phpunit unit/DBTest. php" again to solve the problem.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.