public function tearDown() { if (is_object($this->container)) { $this->container->close(); } }
public function testSimpleRandomWithIniValue() { //TODO FIX -> add properties file, refresh container! $this->container->close(); $container = new AnnotationContainer('test/src', __DIR__ . '/config/annotation.ini'); $simpleRandom = $container->getBean('prototypeSimpleRandomIniValue'); $this->assertInstanceOf('\\Annotation\\SimpleRandomIniValue', $simpleRandom); $this->assertEquals(99, $simpleRandom->getRandomId(), 'Random id not 99'); $container->close(); $this->assertNull($simpleRandom->getRandomId(), 'Random id not null'); $this->container = null; }