'toolbox.local']); } public function test_admin_host_can_open_the_toolbox_menu(): void { $response = $this->get('http://toolbox.local/'); $response->assertOk(); $response->assertSee('', false); } public function test_ip_host_gets_the_standalone_production_diagnosis_page(): void { $response = $this->get('http://192.168.1.20/production-diagnosis'); $response->assertOk(); $response->assertSee('', false); $response->assertDontSee('', false); } public function test_ip_host_cannot_open_other_toolbox_pages(): void { $this ->get('http://192.168.1.20/') ->assertNotFound(); $this ->get('http://192.168.1.20/env') ->assertNotFound(); $this ->get('http://192.168.1.20/settings') ->assertNotFound(); } public function test_ip_host_can_only_call_the_production_diagnosis_api(): void { $this ->postJson('http://192.168.1.20/api/production-diagnosis/diagnose', []) ->assertUnprocessable(); $this ->getJson('http://192.168.1.20/api/admin/meta') ->assertNotFound(); } public function test_unconfigured_hostname_is_rejected(): void { $this ->get('http://attacker.example/production-diagnosis') ->assertNotFound(); } }