diff --git a/tests/Container/ContainerTest.php b/tests/Container/ContainerTest.php index 2ff5fac..d285a43 100644 --- a/tests/Container/ContainerTest.php +++ b/tests/Container/ContainerTest.php @@ -76,6 +76,15 @@ $this->assertSame($container->get('foo'), $container->get('foo')); } + public function testGetThrowCorrectException() + { + $this->expectException(\Psr\Container\ContainerExceptionInterface::class); + $container = (new Container())->set('foo', function() { + throw new \RuntimeException(); + }); + $container->get('foo'); + } + public function testNotFound() { $this->expectException(NotFoundException::class);