コード例 #1
0
ファイル: ActiveRecordTest.php プロジェクト: alphadevx/alpha
 /**
  * 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();
     }
 }
コード例 #2
0
 /**
  * Called after the test functions are executed
  * this function is defined in PHPUnit_TestCase and overwritten
  * here.
  *
  * @since 1.0
  */
 protected function tearDown()
 {
     parent::tearDown();
     $person = new Person();
     $person->dropTable();
     $rights = new Rights();
     $rights->dropTable();
     $rights->dropTable('Person2Rights');
     $rights->dropTable('Person2Article');
     $article = new Article();
     $article->dropTable();
 }
コード例 #3
0
ファイル: DEnumTest.php プロジェクト: alphadevx/alpha
 /**
  * Called after the test functions are executed
  * this function is defined in PHPUnit_TestCase and overwritten
  * here.
  *
  * @since 1.0
  */
 protected function tearDown()
 {
     parent::tearDown();
     $item = new DEnumItem();
     $item->dropTable();
     $this->denum1->dropTable();
     unset($this->denum1);
 }
コード例 #4
0
ファイル: SequenceTest.php プロジェクト: alphadevx/alpha
 /**
  * Called after the test functions are executed
  * this function is defined in PHPUnit_TestCase and overwritten
  * here.
  *
  * @since 1.0
  */
 protected function tearDown()
 {
     parent::tearDown();
     $this->sequence->dropTable();
     unset($this->sequence);
 }
コード例 #5
0
ファイル: RelationTest.php プロジェクト: alphadevx/alpha
 /**
  * Called after the test functions are executed
  * this function is defined in PHPUnit_TestCase and overwritten
  * here.
  *
  * @since 1.0
  */
 protected function tearDown()
 {
     parent::tearDown();
     unset($this->rel1);
     $person = new Person();
     $person->dropTable();
     $rights = new Rights();
     $rights->dropTable();
     $rights->dropTable('Person2Rights');
     $comment = new ArticleComment();
     $comment->dropTable();
     $article = new Article();
     $article->dropTable();
 }
コード例 #6
0
ファイル: EnumTest.php プロジェクト: alphadevx/alpha
 /**
  * Called after the test functions are executed
  * this function is defined in PHPUnit_TestCase and overwritten
  * here.
  *
  * @since 1.0
  */
 protected function tearDown()
 {
     parent::tearDown();
     unset($this->enum1);
     $this->person->dropTable();
     $rights = new Rights();
     $rights->dropTable();
     $rights->dropTable('Person2Rights');
     unset($this->person);
 }