Call to undefined method PHP_CodeCoverage_Filter::getInstance()

前端 未结 7 2362
后悔当初
后悔当初 2020-12-04 14:13

I\'ve got a fresh copy of PHPUnit installed on my system (Ubuntu 11), but whenever I type phpunit in the console I get the following error:

PHP Fa

7条回答
  •  春和景丽
    2020-12-04 15:03

    I came across the same problem, managed to solve it using composer

    Try these steps -

    First uninstall phpunit

    sudo apt-get remove phpunit
    

    Install composer - http://getcomposer.org/doc/01-basic-usage.md#installation

    $ curl -sS https://getcomposer.org/installer | php
    

    Install phpunit - http://phpunit.de/manual/3.7/en/installation.html

    For a system-wide installation via Composer, you can run:

    $ composer global require 'phpunit/phpunit=3.7.*'
    

    You will also have to make sure that you have ~/.composer/vendor/bin/ in your path.

提交回复
热议问题