1
votes

I am new to working with PHPunit. I installed PHPunit with composer and created a phpunit.xml file:

    <?xml version="1.0" encoding="UTF-8" ?>

    <phpunit bootstrap="vendor/autoload.php" colors="true">
        <testsuits>
            <testsuit name="unit">
                <directory>tests</directory>
            </testsuit>
        </testsuits>
    </phpunit>

I get the following error message

PHPUnit 7.5.16 by Sebastian Bergmann and contributors.

Warning - The configuration file did not pass validation! The following problems have been detected:

Line 4: - Element 'testsuits': This element is not expected.

Test results may not be as expected.

1

1 Answers

5
votes

You have a typo on your file <testsuites> and not <testsuits> and also for <testsuite> instead of <testsuit>

see https://phpunit.readthedocs.io/en/8.3/configuration.html#the-testsuites-element