Answer the question
In order to leave comments, you need to log in
How to fix phpunit.xml config file?
Hello.
There is the following configuration file for PHP 8.0.9, phpunit 9.5.8 :
When running tests with the command , the vendor/bin/phpunit
following error is displayed:
As I understand that phpunit was removed in this version <filter>
, I need to write something else.
Thanks for answers.
Answer the question
In order to leave comments, you need to log in
Here is an example of a working phpunit.xml:
<?xml version="1.0" encoding="utf-8"?>
<phpunit bootstrap="./vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
stopOnFailure="false">
<testsuites>
<testsuite name="Test Suite">
<directory>./tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">./src/</directory>
</whitelist>
</filter>
</phpunit>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question