Stabilize Scalar docs response assertions

This commit is contained in:
2026-04-24 09:06:45 +00:00
parent a6a4615ad5
commit cebc945fbe
@@ -8,10 +8,13 @@ class PublicApiDocumentationTest extends TestCase
{
public function test_scalar_api_docs_are_public(): void
{
$this->get('/api/docs')
->assertOk()
->assertSee('"hideClientButton":true', false)
->assertSee('"mcp":{"disabled":true}', false);
$response = $this->get('/api/docs')
->assertOk();
$content = (string) $response->getContent();
$this->assertMatchesRegularExpression('/"hideClientButton"\s*:\s*true/', $content);
$this->assertMatchesRegularExpression('/"mcp"\s*:\s*\{\s*"disabled"\s*:\s*true\s*\}/', $content);
}
public function test_openapi_document_is_publicly_served(): void