Exemplo n.º 1
0
 protected function setUp()
 {
     parent::setUp();
     Category::add('collection');
     Page::addHomePage();
     PageTemplate::add('full', 'Full');
     PageType::add(array('handle' => 'basic', 'name' => 'Basic'));
 }
Exemplo n.º 2
0
 public function getConnection()
 {
     if (self::$conn === null) {
         $config = \Config::get('database');
         $connection_config = $config['connections'][$config['default-connection']];
         $db = Database::getFactory()->createConnection(array('host' => $connection_config['server'], 'user' => $connection_config['username'], 'password' => $connection_config['password'], 'database' => $connection_config['database']));
         self::$conn = $this->createDefaultDBConnection($db->getWrappedConnection(), 'test');
         $this->db = $db;
     }
     return self::$conn;
 }
Exemplo n.º 3
0
 protected function setUp()
 {
     parent::setUp();
     $this->installAttributeCategoryAndObject();
     AttributeType::add('boolean', 'Boolean');
     AttributeType::add('textarea', 'Textarea');
     AttributeType::add('text', 'text');
     foreach ($this->keys as $akHandle => $args) {
         $args['akHandle'] = $akHandle;
         $type = AttributeType::getByHandle($args['type']);
         $this->keys[] = call_user_func_array(array($this->getAttributeKeyClass(), 'add'), array($type, $args));
     }
 }
Exemplo n.º 4
0
 public function setUp()
 {
     \Core::forgetInstance('url/canonical');
     return parent::setUp();
 }
 public function setUp()
 {
     parent::setUp();
     Category::add('user');
 }
Exemplo n.º 6
0
 public function tearDown()
 {
     parent::tearDown();
     $this->cleanup();
 }
Exemplo n.º 7
0
 public function setUp()
 {
     parent::setUp();
     $this->loader = new DatabaseLoader();
 }
Exemplo n.º 8
0
 /**
  * Tears down the fixture, for example, closes a network connection.
  * This method is called after a test is executed.
  */
 public function tearDown()
 {
     unset($this->object);
     parent::tearDown();
 }
Exemplo n.º 9
0
 protected function setUp()
 {
     parent::setUp();
     Category::add('user');
 }
Exemplo n.º 10
0
 public function setUp()
 {
     parent::setUp();
     $this->saver = new DatabaseSaver();
 }