container = new Container(); } /** * Tears down the fixture. * This method is called after a test is executed. * * @access protected * @return void */ protected function tearDown() { unset($this->container); } /** * Test for get * * @return void */ public function testGetWithValidEntry() { $this->container->set('name', 'value'); $this->assertSame('value', $this->container->get('name')); } /** * Test for get * * @return void */ public function testGetThrowsNotFoundException() { $this->setExpectedException('Psr\Container\NotFoundExceptionInterface'); $this->container->get('name'); } /** * Test for has * * @return void */ public function testHasReturnsTrueForValidEntry() { $this->container->set('name', 'value'); $this->assertTrue($this->container->has('name')); } /** * Test for has * * @return void */ public function testHasReturnsFalseForInvalidEntry() { $this->assertFalse($this->container->has('name')); } }