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 03:08:04 +0300
committerdiosmosis <benaka@piwik.pro>2015-06-03 20:01:33 +0300
commit3d20112b66daa5b609dc460399c61262844572be (patch)
treea63d20035ce85f838b5cc3f1afebadd459082b4c /plugins/SegmentEditor
parent6553f8533f54981a179b9e953323e8737b47d438 (diff)
Fixing all tests that use Access::setSingletonInstance().
Diffstat (limited to 'plugins/SegmentEditor')
-rw-r--r--plugins/SegmentEditor/tests/Integration/SegmentEditorTest.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/plugins/SegmentEditor/tests/Integration/SegmentEditorTest.php b/plugins/SegmentEditor/tests/Integration/SegmentEditorTest.php
index adbdbdd395..2635db94f2 100644
--- a/plugins/SegmentEditor/tests/Integration/SegmentEditorTest.php
+++ b/plugins/SegmentEditor/tests/Integration/SegmentEditorTest.php
@@ -8,7 +8,6 @@
namespace Piwik\Plugins\SegmentEditor\tests\Integration;
-use Piwik\Access;
use Piwik\Date;
use Piwik\Piwik;
use Piwik\Plugins\SegmentEditor\API;
@@ -33,14 +32,12 @@ class SegmentEditorTest extends IntegrationTestCase
\Piwik\Plugin\Manager::getInstance()->installLoadedPlugins();
// setup the access layer
- $pseudoMockAccess = new FakeAccess;
FakeAccess::setIdSitesView(array(1, 2));
FakeAccess::setIdSitesAdmin(array(3, 4));
//finally we set the user as a Super User by default
FakeAccess::$superUser = true;
FakeAccess::$superUserLogin = 'superusertest';
- Access::setSingletonInstance($pseudoMockAccess);
APISitesManager::getInstance()->addSite('test', 'http://example.org');
}
@@ -207,4 +204,11 @@ class SegmentEditorTest extends IntegrationTestCase
}
}
}
+
+ public function provideContainerConfig()
+ {
+ return array(
+ 'Piwik\Access' => new FakeAccess()
+ );
+ }
}