/** * Shuts the kernel down if it was used in the test. */ protected static function ensureKernelShutdown() { if (null !== static::$application) { $container = static::$application->getContainer(); static::$application->shutdown(static::$application); $container->reset(); static::$application->setContainer($container); } }
public function testSetContainer() { $mock = $this->getMock('IDependencyInjectionContainer'); $this->object->setContainer($mock); $this->assertThat($this->object->getContainer(), $this->identicalTo($mock)); }