Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordiosmosis <benaka@piwik.pro>2015-05-27 03:15:55 +0300
committerdiosmosis <benaka@piwik.pro>2015-06-02 01:05:28 +0300
commitc499a3f37fb34297fbc3a3fe34db3b603060ec09 (patch)
tree2c359bd0cd5801810a30e4e864951511d3a1cef3 /tests/PHPUnit/Framework/Mock
parent761b2b548f1e7b86bbee2a520c5ea071fa5e0291 (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.php13
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)