Open ghowardPI opened 2 months ago
This is not a bug. If there is no directory, there are no classes/files, but at the same time all found classes/files are enums, so in theoretical terms the statement is correct. All files in App\Enums are Enums
@ghowardPI I ran into this as well but when I read the docs the parameter you pass to the expect()
function is NOT a file path - it's a namespace.
So you can stick a file with namespace App\Enums into say the App\Models folder and it'll still be processed by your test.
What Happened
Expect('App\Enums')->toBeEnums(); is passing although my App doesn't contain an Enums directory. The test is executed in tests/Unit/ArchTest.php
How to Reproduce
I set up a fresh Laravel app and ran test('app')->expect('App\Enums')->toBeEnums(); inside tests/Unit/ArchTest.php, which passes. However the app does not contain the App\Enums directory.
Sample Repository
No response
Pest Version
2.34
PHP Version
8.2.6
Operation System
Windows
Notes
No response