Skip to content

Commit

Permalink
Separate chain calls (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
sankaest committed Jun 2, 2022
1 parent fa5bc9c commit c3314c1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
4 changes: 3 additions & 1 deletion tests/SwaggerJsonTest.php
Expand Up @@ -70,7 +70,9 @@ private function createServerRequest(): ServerRequestInterface
private function createRequestHandler(): RequestHandlerInterface
{
$requestHandler = $this->createMock(RequestHandlerInterface::class);
$requestHandler->method('handle')->willReturn((new ResponseFactory())->createResponse());
$requestHandler
->method('handle')
->willReturn((new ResponseFactory())->createResponse());

return $requestHandler;
}
Expand Down
4 changes: 3 additions & 1 deletion tests/SwaggerServiceTest.php
Expand Up @@ -26,7 +26,9 @@ public function testSwaggerServiceEmptyArrayFetch(): void
$this->expectException(InvalidArgumentException::class);
$this->expectExceptionMessage('Annotation paths cannot be empty array.');

$this->createService()->fetch([]);
$this
->createService()
->fetch([]);
}

public function testImmutability(): void
Expand Down
8 changes: 6 additions & 2 deletions tests/SwaggerUiTest.php
Expand Up @@ -44,7 +44,9 @@ public function testSwaggerUiMiddlewareWithUrl(): void
public function testSwaggerUiMiddleware(): void
{
$container = $this->createContainer();
$middleware = $this->createMiddleware($container)->withJsonUrl('/');
$middleware = $this
->createMiddleware($container)
->withJsonUrl('/');

$request = $this->createServerRequest();
$handler = $this->createRequestHandler();
Expand Down Expand Up @@ -109,7 +111,9 @@ private function createServerRequest(): ServerRequestInterface
private function createRequestHandler(): RequestHandlerInterface
{
$requestHandler = $this->createMock(RequestHandlerInterface::class);
$requestHandler->method('handle')->willReturn((new ResponseFactory())->createResponse());
$requestHandler
->method('handle')
->willReturn((new ResponseFactory())->createResponse());

return $requestHandler;
}
Expand Down

0 comments on commit c3314c1

Please sign in to comment.