'launcher-secret']); $response = $this->call( method: 'POST', uri: '/api/service/update-appcast', content: $this->appcastXml(), ); $response->assertForbidden(); } public function test_update_appcast_saves_raw_xml_to_public_storage(): void { Storage::fake('public'); config(['auth.launcher_auth_key' => 'launcher-secret']); $xml = $this->appcastXml(); $response = $this->call( method: 'POST', uri: '/api/service/update-appcast', server: [ 'HTTP_AUTH' => 'launcher-secret', 'CONTENT_TYPE' => 'application/xml', ], content: $xml, ); $response ->assertOk() ->assertJson(['message' => 'XML saved']); Storage::disk('public')->assertExists('appcast.xml'); $this->assertSame($xml, Storage::disk('public')->get('appcast.xml')); } private function appcastXml(): string { return <<<'XML' Moonwell Launcher - Appcast Version 1.2.0 Launcher update. Sat, 16 May 2026 12:00:00 +0400 XML; } }