public static function setUpBeforeClass()
 {
     self::$client = static::createClient();
     self::$router = self::$kernel->getContainer()->get('router');
     self::$rootDir = self::$kernel->getContainer()->getParameter('kernel.root_dir');
     parent::setUpBeforeClass();
 }
示例#2
0
 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     if (null === static::$kernel) {
         static::$kernel = static::createKernel();
     }
     static::$kernel->boot();
     static::$kernel->getContainer()->get('request')->setLocale('en_EN');
     static::$em = static::$kernel->getContainer()->get('doctrine.orm.entity_manager');
     static::$translator = static::$kernel->getContainer()->get('translator');
     $schemaTool = new SchemaTool(static::$em);
     static::$metadata = static::$em->getMetadataFactory()->getAllMetadata();
 }
 /**
  * @throws \Doctrine\ORM\Tools\ToolsException
  */
 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     static::$kernel = static::createKernel(array());
     static::$kernel->boot();
     $metadata = static::getMetadata();
     $tool = new SchemaTool(static::$em);
     $tool->dropDatabase();
     $tool->createSchema($metadata);
     $validator = new SchemaValidator(static::$em);
     $errors = $validator->validateMapping();
     static::assertCount(0, $errors, implode("\n\n", array_map(function ($l) {
         return implode("\n\n", $l);
     }, $errors)));
 }
示例#4
0
 /**
  * Set up before the class
  */
 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     // Setup test db
     system(dirname(__FILE__) . '/../dbSetup.sh');
 }
 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     static::loadDatabase();
 }