pestphp / pest

Pest is an elegant PHP testing Framework with a focus on simplicity, meticulously designed to bring back the joy of testing in PHP.
https://pestphp.com
MIT License
9.07k stars 315 forks source link

Test file not discovering for architecture tests #1071

Closed azonedev closed 5 months ago

azonedev commented 5 months ago

I created a folder inside the tests, as the image shows image

When I run the tests then it only runs the Unit folders tests. not architecture folder tests. How can I fix this? Note: I didn't change anything on Pest.php or TestCase.php

faissaloux commented 5 months ago

I think you didn't add it to your testsuites!

JonPurvis commented 5 months ago

In your phpunit.xml file, you should see a section that looks like:

<testsuites>
    <testsuite name="Unit">
        <directory>tests/Unit</directory>
    </testsuite>
    <testsuite name="Feature">
        <directory>tests/Feature</directory>
    </testsuite>
</testsuites>

You'll need to add something in for your Architecture tests:

<testsuite name="Architecture">
    <directory>tests/Architecture</directory>
</testsuite>