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.06k stars 313 forks source link

[Bug]: Weird behavior with seed #1123

Open deshiloh opened 3 months ago

deshiloh commented 3 months ago

What Happened

Here my two test

test("Can login super user", function() {
    $this->seed();

    post(route('login'), [
        'email' => 'test1@test.com',
        'password' => 'test'
    ])
        ->assertSessionHasNoErrors()
        ->assertRedirect(route('admin.homepage'))
    ;
});

test("Can login user", function() {
    $this->seed();

    post(route('login'), [
        'email' => 'test2@test.com',
        'password' => 'test'
    ])
        ->assertSessionHasNoErrors()
        ->assertRedirect(route('front.reservation.list'))
    ;
});

When I run them, the second failed. When I run the first and the second separately, it works... How ?

How to Reproduce

Install fresh laravel app with pestphp, use defaults login scripts.

Sample Repository

No response

Pest Version

2.34.5

PHP Version

8.1.25

Operation System

macOS

Notes

No response