diff options
author | diosmosis <benaka@piwik.pro> | 2015-05-27 03:15:55 +0300 |
---|---|---|
committer | diosmosis <benaka@piwik.pro> | 2015-06-02 01:05:28 +0300 |
commit | c499a3f37fb34297fbc3a3fe34db3b603060ec09 (patch) | |
tree | 2c359bd0cd5801810a30e4e864951511d3a1cef3 /tests/PHPUnit/Framework/Mock | |
parent | 761b2b548f1e7b86bbee2a520c5ea071fa5e0291 (diff) |
Fix settings related tests that require clearing FakeAccess access.
Diffstat (limited to 'tests/PHPUnit/Framework/Mock')
-rw-r--r-- | tests/PHPUnit/Framework/Mock/FakeAccess.php | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/tests/PHPUnit/Framework/Mock/FakeAccess.php b/tests/PHPUnit/Framework/Mock/FakeAccess.php index 1f3ff2c95d..7e67f0114d 100644 --- a/tests/PHPUnit/Framework/Mock/FakeAccess.php +++ b/tests/PHPUnit/Framework/Mock/FakeAccess.php @@ -23,6 +23,14 @@ class FakeAccess public static $identity = 'superUserLogin'; public static $superUserLogin = 'superUserLogin'; + public static function clearAccess() + { + self::$superUser = false; + self::$idSitesAdmin = array(); + self::$idSitesView = array(); + self::$identity = 'superUserLogin'; + } + public function getTokenAuth() { return false; @@ -30,10 +38,7 @@ class FakeAccess public function __construct() { - self::$superUser = false; - self::$idSitesAdmin = array(); - self::$idSitesView = array(); - self::$identity = 'superUserLogin'; + self::clearAccess(); } public static function setIdSitesAdmin($ids) |