Open roelmagdaleno opened 2 years ago
In phpunit.xml.dist file, we have to set the testsuite like this:
phpunit.xml.dist
testsuite
<testsuite name="testing-phpunit"> <directory suffix="Test.php">./tests/</directory> </testsuite>
Then, on each test, add this code at the beginning:
uses(WP_UnitTestCase::class);
The WP_UnitTestCase class will be loaded from tests/bootstrap.php.
WP_UnitTestCase
tests/bootstrap.php
In
phpunit.xml.dist
file, we have to set thetestsuite
like this: