createServerRequest('GET', 'http://example.com/'); $controller = new LicenseController(new ResponseRenderer(), ResponseFactory::create()); $response = $controller($request); self::assertSame(StatusCodeInterface::STATUS_OK, $response->getStatusCode()); self::assertSame(['text/plain; charset=utf-8'], $response->getHeader('Content-Type')); $body = (string) $response->getBody(); self::assertStringContainsString('GNU GENERAL PUBLIC LICENSE', $body); self::assertStringContainsString('Version 2, June 1991', $body); } }