[email protected]
9 months ago

PHPUnit throws error but works when specifying the specific test

Posted 9 months ago by [email protected]

I recently upgraded our codebase to use Laravel 5.6 and I'm finding a weird issue where phpunit will fail with the following error message: PHP Fatal error: Cannot declare class Tests\Feature\CreateVisitorTest, because the name is already in use in /var/www/grow/tests/Feature/CreateVisitorTest.php on line 12

However if I were to specify the file specifically it works fine. e.g., this command works and my test passes: phpunit tests/feature/CreateVisitorTest.php

I've tried doing composer dump-autoload

Any other ideas?

Please sign in or create an account to participate in this conversation.