Skip to content

Commit

Permalink
Merge branch 'qa/cs-fixes'
Browse files Browse the repository at this point in the history
  • Loading branch information
michalbundyra committed Apr 24, 2020
2 parents 315b28e + b772197 commit 746ee7d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -24,5 +24,5 @@ $ composer require mezzio/mezzio-helpers

## Documentation

See the [mezzio](https://github.com/mezzio/mezzio/blob/master/doc/book)
See the [mezzio](https://github.com/mezzio/mezzio/blob/master/docs/book)
documentation tree, or browse online at https://docs.mezzio.dev/mezzio/features/helpers/intro/
6 changes: 5 additions & 1 deletion src/ServerUrlMiddlewareFactory.php
Expand Up @@ -33,6 +33,10 @@ public function __invoke(ContainerInterface $container) : ServerUrlMiddleware
));
}

return new ServerUrlMiddleware($container->has(ServerUrlHelper::class) ? $container->get(ServerUrlHelper::class) : $container->get(\Zend\Expressive\Helper\ServerUrlHelper::class));
return new ServerUrlMiddleware(
$container->has(ServerUrlHelper::class)
? $container->get(ServerUrlHelper::class)
: $container->get(\Zend\Expressive\Helper\ServerUrlHelper::class)
);
}
}
5 changes: 4 additions & 1 deletion test/Template/TemplateVariableContainerMiddlewareTest.php
Expand Up @@ -41,7 +41,10 @@ public function testProcessInjectsVariableContainerIntoRequestPassedToHandler()
->will([$this->request, 'reveal'])
->shouldBeCalledTimes(1);
$this->request
->withAttribute(\Zend\Expressive\Helper\Template\TemplateVariableContainer::class, Argument::type(TemplateVariableContainer::class))
->withAttribute(
\Zend\Expressive\Helper\Template\TemplateVariableContainer::class,
Argument::type(TemplateVariableContainer::class)
)
->willReturn($clonedRequest)
->shouldBeCalledTimes(1);

Expand Down

0 comments on commit 746ee7d

Please sign in to comment.