seed(ContentSeeder::class); View::share('PageList', Page::getCached() ->mapWithKeys(fn ($page) => [ $page->slug->value() => $page, ])); Cache::flush(); // WHEN $response = $this->get('/contactez-nous'); // THEN $response->assertStatus(404); }); it('can access post /contactez-nous', function () { // GIVEN $this->seed(ContentSeeder::class); View::share('PageList', Page::getCached() ->mapWithKeys(fn ($page) => [ $page->slug->value() => $page, ])); Cache::flush(); // WHEN $response = $this->post('/contactez-nous', []); // THEN $response->assertStatus(302); }); });