get('/docs/api/v1') ->assertOk() ->assertHeader('content-type', 'application/yaml; charset=UTF-8') // Benannter Download statt anonymem „v1.yml“ im Download-Ordner. ->assertDownload('pressekonto-api-v1.yml') ->assertSee('openapi: 3.1.0', false) ->assertSee('/press-releases:', false) // Übernahme der Legacy-Integrationen (06.07.): Alt-Schlüssel bleiben // gültig, unbekannte bekommen den Migrationshinweis. ->assertSee('Bestehende API-Schlüssel der Altportale wurden übernommen', false); }); test('the public api page documents the real endpoints', function () { /** @var TestCase $this */ $this->get('https://pressekonto.test/de/api') ->assertSuccessful() ->assertSeeText('API-Dokumentation') ->assertSee('/press-releases/{id}/submit', false) ->assertSee('press-releases:write', false) // Keine Fantasie-Features mehr (OAuth/SDKs/Webhooks gab es nie). ->assertDontSee('OAuth 2.0') ->assertDontSee('api.example.com'); });