seed(RolePermissionSeeder::class); $this->actingAs($this->userWithRoles('admin')); } protected function setEnvironment(string $environment): void { $this->app['env'] = $environment; } #[Test] public function nothing_is_shown_in_a_local_install(): void { $this->setEnvironment('local'); $this->get('/admin') ->assertOk() ->assertDontSee(__('panel.environment.production')) ->assertDontSeeText('bg-danger-600', escape: false); } #[Test] public function production_says_so_in_the_loudest_colour(): void { $this->setEnvironment('production'); $this->get('/admin') ->assertOk() ->assertSee(__('panel.environment.production')); } #[Test] public function anything_else_names_itself(): void { $this->setEnvironment('staging'); $this->get('/admin') ->assertOk() ->assertSee(__('panel.environment.other', ['name' => 'staging'])); } }