With the following phpunit
config I'm getting:
Discovered PHPUnit configurations: file:///......./phpunit.xml
0 tests found.
PHP unit config:
<?xml version="1.0" encoding="utf-8"?>
<phpunit bootstrap="./......./bootstrap.php" backupGlobals="false" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true">
<testsuites>
<testsuite name="project">
<directory prefix="class-test-" suffix=".php">
./tests/
</directory>
<directory prefix="test-" suffix=".php">
./tests/
</directory>
<directory suffix="-test.php">
./tests/
</directory>
</testsuite>
</testsuites>
</phpunit>
I don't know how devsense is actually parsing this file, and how sophisticated it is at discovering the test location. The docs state:
The name, location, extension and settings of the tests are defined in the phpunit.xml configuration file. The tests should be located in a sub-directory, not directly in the workspace root, because PHPUnit does not recognize them there.
However, I'm pretty sure PHPUnit supports tests in the root just fine, assuming you've set the correct directives in the phpunit.xml. So, I'm wondering if devsense has maybe a naiive implementation of test discovery that isn't as comprehensive as what PHPUnit allows?