get("/errors/{$code->value}"); // THEN $response->assertStatus(200); $response->assertSee('Resource Not Found'); $response->assertSee('not-found'); }); it('returns a 404 for an invalid error code slug', function (): void { // GIVEN /** @var \Tests\TestCase $test */ $test = $this; $invalidSlug = 'non-existing-error-code'; // WHEN $response = $test->get("/errors/{$invalidSlug}"); // THEN $response->assertStatus(404); }); });