-
Notifications
You must be signed in to change notification settings - Fork 196
Improved exceptions handling within the Container\ApplicationFactory #197
Improved exceptions handling within the Container\ApplicationFactory #197
Conversation
Oops check the CS rules |
Have no idea why is that strange code formatting issue randomly happening, but after another file modification/commit, everything seems fine. |
@@ -151,7 +152,12 @@ public function __invoke(ContainerInterface $container) | |||
*/ | |||
private function injectRoutes(Application $app, ContainerInterface $container) | |||
{ | |||
$config = $container->has('config') ? $container->get('config') : []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This case is legitimate. Next isset provide a fallback. Revert.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, you're right, I'll revert it after you finish a review.
I'll review this again after to be rebased on top of #195. |
Agreed. |
->get('Zend\Expressive\Router\RouterInterface') | ||
->will(function () use ($router) { | ||
return $router->reveal(); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nikolaposa Can you please update these to use ZendTest\Expressive\ContainerTrait
, now that #194/#195 have been merged? Doing so will cut down on a lot of noise, making it easier to see what's being tested.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@weierophinney Sure, I've already discussed with @Maks3w how we should handle this.
0f542de
to
6278101
Compare
$this->injectServiceInContainer($this->container, 'config', $config); | ||
|
||
$this->setExpectedException( | ||
'Zend\Expressive\Container\Exception\InvalidArgumentException', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import and use class constant
Please apply the last comment, and squash the commits. Thanks for your contribution |
ca1483d
to
c472d15
Compare
Done. I guess this is it. |
@weierophinney This is good for me. |
Improved exceptions handling within the Container\ApplicationFactory
This PR addresses issue #196.
/cc @Maks3w
Fix #196