You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am using Laravel 11 with Sail for local development and I run the tests through the containers (sail artisan test).
The problem that only the first test that is executed finds the indicated route, even if they are the same.
The second tests returns a 404 error from the ->get().
How to Reproduce
Install Laravel 11
Create a route to return something
Use Pest to test that route two times:
it('test 1', function () {
$this->get('test')->assertStatus(200);
});
it('test 2', function () {
$this->get('test')->assertStatus(200);
});
Result:
sail artisan test
FAIL Tests\Feature\Api\Home\HomeControllerTest
✓ it test 1
⨯ it test 2 <-- Error 404
if I run one by one, it works without problems:
sail artisan test --filter="Test 1"
PASS Tests\Feature\Api\Home\HomeControllerTest
✓ it test 1
sail artisan test --filter="Test 2"
PASS Tests\Feature\Api\Home\HomeControllerTest
✓ it test 2
Also using --parallel we have the same issue.
Sample Repository
No response
Pest Version
3.5.1
PHP Version
8.3.4
Operation System
Linux
Notes
No response
The text was updated successfully, but these errors were encountered:
What Happened
Hi, I am using Laravel 11 with Sail for local development and I run the tests through the containers (
sail artisan test
).The problem that only the first test that is executed finds the indicated route, even if they are the same.
The second tests returns a
404
error from the->get()
.How to Reproduce
Result:
if I run one by one, it works without problems:
Also using
--parallel
we have the same issue.Sample Repository
No response
Pest Version
3.5.1
PHP Version
8.3.4
Operation System
Linux
Notes
No response
The text was updated successfully, but these errors were encountered: