0

i run tests in my laravel project but the test files are inside a composer package, here is my section of phpunit.xml

<testsuite name="Package Unit">
<directory suffix="Test.php">./vendor/mypackage/package/tests/Unit</directory>
</testsuite>

The tests works fine, but i'm not able to have them covered, i added the code below on phpunit.xml

 <coverage processUncoveredFiles="true">
        <include>
            <directory suffix=".php">./vendor/mypackage/package/src</directory>
            <directory suffix=".php">./app</directory>
        </include>
    </coverage>

But the coverage report contains only the filess inside the "app" dir, how can i solve this?

Luca Becchetti
  • 1,210
  • 1
  • 12
  • 28
  • 1
    If I understand correctly you want to run your package test along with the laravel project? If this is the case, just simply don' t. your package tests are for your package and your laravel project tests are for the project. Think of your package as an independent project with it's own tests. – MP-programming Nov 08 '22 at 16:58
  • this is a plugin of another package that it's tested with orchestra, but to test this plugin i need a project with other package installed and configured! – Luca Becchetti Nov 09 '22 at 08:04

0 Answers0