Exemplo n.º 1
0
 public static function setUpBeforeClass()
 {
     static::$entityCollection = array();
     static::$runtimeCollection = array();
     date_default_timezone_set('Europe/Paris');
     ImportController::importContent(ROADIZ_ROOT . '/tests/Fixtures/Handlers/Page.json', "RZ\\Roadiz\\CMS\\Importers\\NodeTypesImporter", null);
 }
Exemplo n.º 2
0
 public static function setUpBeforeClass()
 {
     static::$entityCollection = array();
     $settings = static::settingsProvider();
     foreach ($settings as $setting) {
         $s = new Setting();
         $s->setName($setting[0]);
         $s->setValue($setting[1]);
         Kernel::getService('em')->persist($s);
         static::$entityCollection[] = $s;
     }
     Kernel::getService('em')->flush();
 }
Exemplo n.º 3
0
 public static function setUpBeforeClass()
 {
     static::$entityCollection = array();
     $roles = array(array("role___test", "ROLE_TEST"), array("role___test", "ROLE_TEST"), array("tèst tèst", "ROLE_TEST_TEST"));
     foreach ($roles as $value) {
         $role = Kernel::getService('em')->getRepository('RZ\\Roadiz\\Core\\Entities\\Role')->findOneByName($value[1]);
         if (null === $role) {
             $a = new Role();
             $a->setName($value[0]);
             Kernel::getService('em')->persist($a);
         }
     }
     Kernel::getService('em')->flush();
 }
 /**
  * Nothing special to do except init collection
  * array.
  */
 public static function setUpBeforeClass()
 {
     static::$entityCollection = array();
 }