bodi87
bodi87

Reputation: 551

PHPunit warning error testsuits not expected

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.

Upvotes: 2

Views: 7938

Answers (1)

GrenierJ
GrenierJ

Reputation: 1140

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

Upvotes: 6

Related Questions