Example #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();
 }
Example #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();
 }
Example #3
0
 /**
  * Remove all the test pages that were copied over 
  */
 public static function tearDownAfterClass()
 {
     if (!self::$skipAllTests) {
         exec('rm -r ../../x2WebTrackingTestPages');
     }
     parent::tearDownAfterClass();
 }
Example #4
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();
 }