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-06-01 02:00:30 +0300
committerdiosmosis <benaka@piwik.pro>2015-06-03 20:01:33 +0300
commit86f472e3620a07981332c1c4f06329d68fb5a73d (patch)
tree3ad22b737530f754ecb2a17cf379cfd369336dcd /tests/PHPUnit/Framework/Fixture.php
parentbf55995a0c343667bfbc2f86761d22a3b02b3a19 (diff)
Move Access singleton to DI.
Diffstat (limited to 'tests/PHPUnit/Framework/Fixture.php')
-rw-r--r--tests/PHPUnit/Framework/Fixture.php12
1 files changed, 1 insertions, 11 deletions
diff --git a/tests/PHPUnit/Framework/Fixture.php b/tests/PHPUnit/Framework/Fixture.php
index f21ea51176..8cbd8ebd7d 100644
--- a/tests/PHPUnit/Framework/Fixture.php
+++ b/tests/PHPUnit/Framework/Fixture.php
@@ -213,8 +213,6 @@ class Fixture extends \PHPUnit_Framework_Assert
DbHelper::truncateAllTables();
}
- static::createAccessInstance();
-
// We need to be SU to create websites for tests
Access::getInstance()->setSuperUserAccess();
@@ -623,11 +621,6 @@ class Fixture extends \PHPUnit_Framework_Assert
*/
public static function setUpScheduledReports($idSite)
{
- // fake access is needed so API methods can call Piwik::getCurrentUserLogin(), e.g: 'ScheduledReports.addReport'
- $pseudoMockAccess = new FakeAccess;
- FakeAccess::$superUser = true;
- Access::setSingletonInstance($pseudoMockAccess);
-
// retrieve available reports
$availableReportMetadata = APIScheduledReports::getReportMetadata($idSite, ScheduledReports::EMAIL_TYPE);
@@ -825,13 +818,10 @@ class Fixture extends \PHPUnit_Framework_Assert
}
/**
- * Sets up access instance.
+ * @deprecated
*/
public static function createAccessInstance()
{
- Access::setSingletonInstance(null);
- Access::getInstance();
- Piwik::postEvent('Request.initAuthenticationObject');
}
public function dropDatabase($dbName = null)