/** * 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(); } }
/** * 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(); }
/** * 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); }
/** * 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); }
/** * 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(); }
/** * 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); }