getMockRequest('/.well-known/openapi.yaml'); $controller = new OpenApiController(); $response = $controller->get($request); $this->assertEquals(200, $response->getStatusCode()); $this->assertStringContainsString('openapi: 3.0.0', (string)$response->getBody()); } public function testBuildsJson(): void { $request = $this->getMockRequest(uri: '/.well-known/openapi.json'); $controller = new OpenApiController(); $response = $controller->get($request); $this->assertEquals(200, $response->getStatusCode()); $this->assertEquals('application/json', $response->getHeaderLine('Content-Type')); $this->assertNotFalse(json_decode($response->getBody()->getContents())); } }