Beispiel #1
0
 /**
  * Called before the test functions will be executed
  * this function is defined in PHPUnit_TestCase and overwritten
  * here.
  *
  * @since 1.0
  */
 protected function setUp()
 {
     parent::setUp();
     $config = ConfigProvider::getInstance();
     foreach ($this->getActiveRecordProviders() as $provider) {
         $config->set('db.provider.name', $provider[0]);
         $rights = new Rights();
         $rights->rebuildTable();
         $standardGroup = new Rights();
         $standardGroup->set('name', 'Standard');
         $standardGroup->save();
         $request = new BadRequest();
         $request->rebuildTable();
         $this->person = $this->createPersonObject('unitTestUser');
         $this->person->rebuildTable();
         $lookup = new RelationLookup('Alpha\\Model\\Person', 'Alpha\\Model\\Rights');
         // just making sure no previous test user is in the DB
         $this->person->deleteAllByAttribute('URL', 'http://unitTestUser/');
         $this->person->deleteAllByAttribute('displayName', 'unitTestUser');
         $article = new Article();
         $article->rebuildTable();
         $comment = new ArticleComment();
         $comment->rebuildTable();
         $tag = new Tag();
         $tag->rebuildTable();
     }
 }
Beispiel #2
0
 /**
  * Called before the test functions will be executed
  * this function is defined in PHPUnit_TestCase and overwritten
  * here.
  *
  * @since 1.0
  */
 protected function setUp()
 {
     parent::setUp();
     $this->sequence = new Sequence();
     $this->sequence->rebuildTable();
     $this->sequence->set('prefix', 'TEST');
     $this->sequence->set('sequence', 1);
     $this->sequence->save();
 }
Beispiel #3
0
 /**
  * Called before the test functions will be executed
  * this function is defined in PHPUnit_TestCase and overwritten
  * here.
  *
  * @since 1.0
  */
 protected function setUp()
 {
     parent::setUp();
     $denum = new DEnum();
     $denum->rebuildTable();
     $item = new DEnumItem();
     $item->rebuildTable();
     $this->denum1 = new DEnum('Article::section');
     $item->set('DEnumID', $this->denum1->getOID());
     $item->set('value', 'Test');
     $item->save();
 }
Beispiel #4
0
 /**
  * Called before the test functions will be executed
  * this function is defined in PHPUnit_TestCase and overwritten
  * here.
  *
  * @since 1.0
  */
 protected function setUp()
 {
     parent::setUp();
     $this->enum1 = new Enum();
     $rights = new Rights();
     $rights->rebuildTable();
     $this->person = new Person();
     $this->person->set('displayName', 'enumunittest');
     $this->person->set('email', '*****@*****.**');
     $this->person->set('password', 'password');
     $this->person->rebuildTable();
     $this->person->save();
 }
Beispiel #5
0
 /**
  * Called before the test functions will be executed
  * this function is defined in PHPUnit_TestCase and overwritten
  * here.
  *
  * @since 1.2.1
  */
 protected function setUp()
 {
     parent::setUp();
     $rights = new Rights();
     $rights->rebuildTable();
     $standardGroup = new Rights();
     $standardGroup->set('name', 'Standard');
     $standardGroup->save();
     $person = new Person();
     $person->rebuildTable();
     $article = new Article();
     $article->rebuildTable();
 }
Beispiel #6
0
 /**
  * Called before the test functions will be executed
  * this function is defined in PHPUnit_TestCase and overwritten
  * here.
  *
  * @since 1.0
  */
 protected function setUp()
 {
     parent::setUp();
     $this->rel1 = new Relation();
     $rights = new Rights();
     $rights->rebuildTable();
     $article = new Article();
     $article->rebuildTable();
     $comment = new ArticleComment();
     $comment->rebuildTable();
     $standardGroup = new Rights();
     $standardGroup->set('name', 'Standard');
     $standardGroup->save();
     $this->person = new Person();
     $this->person->set('displayName', 'unittestuser');
     $this->person->set('email', '*****@*****.**');
     $this->person->set('password', 'password');
     $this->person->rebuildTable();
     $this->person->save();
 }