I installed Laravel Modules on My Laravel 10 Project. I tested many setting in phpunit for detecting module's tests but phpunit cannot find the tests.
In laravel 8, this setting works for me:
<coverage processUncoveredFiles="true">
<include>
<directory suffix="Test.php">./Modules/**/Tests/Unit/</directory>
<directory suffix="Test.php">./Modules/**/Tests/Feature/</directory>
</include>
</coverage>
But in Laravel 10 coverage tag make error.
With Bellow code, test cannot detect module's tests as well:
<testsuite name="Module Tests">
<directory suffix="Test.php">./Modules/*/Tests</directory>
</testsuite>
Or
<testsuite name="Unit">
<directory>./Modules/**/Tests/Unit</directory>
</testsuite>
<testsuite name="Feature">
<directory>./Modules/**/Tests/Feature</directory>
</testsuite>
for laravel modules, you can either specify the testsuite one after the other using this approach
or using your approach
in the second approach, the suffix was .PHP , this will pick all.