Skip to content

Commit

Permalink
apply === comparison for $container->has()
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Oct 4, 2015
1 parent bc050e9 commit 2e904f5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function __construct(ContainerInterface $container = null)
$container = Container\PHPDiFactory::buildContainer(Loader::load());
}

if ($container->has('router') == false) {
if ($container->has('router') === false) {
throw new Exception('Define router config');
}

Expand Down
1 change: 1 addition & 0 deletions tests/AppTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public function testAppWithContainerThatDoesnotHasRouter()
$this->setExpectedException('Exception', 'Define router config');

$container = $this->prophesize('Interop\Container\ContainerInterface');
$container->has('router')->willReturn(false)->shouldBeCalled();
$app = new App($container->reveal());
}

Expand Down

0 comments on commit 2e904f5

Please sign in to comment.