Example #1
0
 /**
  * {@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;
     }
 }
Example #2
0
 public function register(ContainerInterface $container)
 {
     if (null !== $this->getServiceName() && !$container->has($this->getServiceName())) {
         $container->set($this->getServiceName(), $this);
     }
 }