Пример #1
0
 /**
  * Remove all the test pages that were copied over 
  */
 public static function tearDownAfterClass()
 {
     if (!self::$skipAllTests) {
         exec('rm ../controllers/ProfileTestController.php');
     }
     parent::tearDownAfterClass();
 }
Пример #2
0
 public static function tearDownAfterClass()
 {
     // restore default permissions
     if (count(self::$defaultPermissions)) {
         Yii::app()->db->createCommand("\n                insert into x2_auth_item_child (`parent`, `child`) values " . implode(',', array_map(function ($record) {
             return "('{$record['parent']}','{$record['child']}')";
         }, self::$defaultPermissions)) . "\n            ")->execute();
     }
     // clean up fixture
     Yii::app()->db->createCommand("\n            delete from x2_auth_item where name='role1'\n        ")->execute();
     foreach (self::$authItemChildrenAdded as $record) {
         Yii::app()->db->createCommand("\n                delete from x2_auth_item_child where parent='{$record[0]}' and child='{$record[1]}'\n            ")->execute();
     }
     Yii::app()->cache->flush();
     Yii::app()->authCache->clear();
     parent::tearDownAfterClass();
 }
Пример #3
0
 /**
  * Cookies cannot be deleted in ie8 unless ie8 is visiting a page with the domain associated
  * with the cookies.
  */
 public function deleteAllVisibleCookies($url = '')
 {
     if ($this->isIE8()) {
         $this->open($url);
     }
     parent::deleteAllVisibleCookies();
 }
Пример #4
0
 public function tearDown()
 {
     if (isset($this->_oldSession)) {
         $_SESSION = $this->_oldSession;
     }
     self::$skipAllTests = false;
     self::$loadFixtures = X2_LOAD_FIXTURES;
     self::$loadFixturesForClassOnly = X2_LOAD_FIXTURES_FOR_CLASS_ONLY;
     parent::tearDown();
 }
Пример #5
0
 public static function tearDownAfterClass()
 {
     Yii::app()->db->createCommand("\n            delete from x2_auth_item_child where\n                parent='DefaultRole' and child='ReportsReadOnlyAccess' or\n                parent='DefaultRole' and child='GroupsFullAccess' or\n                parent='DefaultRole' and child='GroupsUpdateAccess' or\n                parent='DefaultRole' and child='GroupsBasicAccess';\n        ")->execute();
     Yii::app()->authCache->clear();
     return parent::tearDownAfterClass();
 }
Пример #6
0
 public function tearDown()
 {
     TestingAuxLib::setConstant('X2_DEBUG_EMAIL', 'false');
     return parent::tearDown();
 }