/** * {@inheritdoc} */ protected function setUp() { $kernel = static::createKernel(); $kernel->boot(); $this->_em = self::createTestEntityManager(); $this->_container = $kernel->getContainer(); $this->_container->set('doctrine.orm.entity_manager', $this->_em); if (!isset($GLOBALS['TEST_CHARGED'])) { $this->_createSchemas(); $this->_insertData(); $GLOBALS['TEST_CHARGED'] = true; } }
public function register(ContainerInterface $container) { if (null !== $this->getServiceName() && !$container->has($this->getServiceName())) { $container->set($this->getServiceName(), $this); } }