0

I tried running PHP in my code and it shows

$ ./vendor/bin/phpunit
PHP Fatal error:  Call to undefined method PHP_CodeCoverage_Filter::addDirectoryToBlacklist() in /home/petra/myproject/vendor/phpunit/phpunit/src/TextUI/TestRunner.php on line 979

Previously it's running normal.

Here's in the composer.json

"require-dev": {
    ...
    "phpunit/phpunit": "4.6.*", 
    ...
}

Here's the content of phpunit.xml.

<phpunit bootstrap="./test/bootstrap.php">
    <testsuites>
        <testsuite name="Test">
            <directory>./test</directory>
        </testsuite>
    </testsuites>
</phpunit>

The content of ./test/bootstrap.php is just this

require dirname(__FILE__) . '/../vendor/autoload.php';

What did I do wrong?

1 Answer 1

1

Just tried manually set the phpunit/php-code-coverage dependency to 2.2.4 and this works.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.