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-14 12:31:50 +0300
committerdiosmosis <benaka@piwik.pro>2015-06-11 09:45:17 +0300
commitb0f431375d68e533eb31a57d1fc0c5fdc3fe752b (patch)
tree16fb630639a6bca5bf8018c69b9f60cd5a8b61de /tests/PHPUnit/Framework/TestCase
parentb621564a7bb2976bb4d790295fe7b6b27c469231 (diff)
Use mock RawLogDao instance in PrivacyManagerTest instead of test events. Also allow IntegrationTests to override DI config for tests.
Diffstat (limited to 'tests/PHPUnit/Framework/TestCase')
-rw-r--r--tests/PHPUnit/Framework/TestCase/IntegrationTestCase.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/PHPUnit/Framework/TestCase/IntegrationTestCase.php b/tests/PHPUnit/Framework/TestCase/IntegrationTestCase.php
index 9f2c5eb688..0b1914d08f 100644
--- a/tests/PHPUnit/Framework/TestCase/IntegrationTestCase.php
+++ b/tests/PHPUnit/Framework/TestCase/IntegrationTestCase.php
@@ -9,11 +9,11 @@
namespace Piwik\Tests\Framework\TestCase;
use Piwik\Access;
+use Piwik\Application\Environment;
use Piwik\Config;
use Piwik\Db;
use Piwik\Tests\Framework\Fixture;
use Piwik\Cache as PiwikCache;
-use Piwik\Tests\Framework\Mock\TestConfig;
/**
* Tests extending IntegrationTestCase are much slower to run: the setUp will
@@ -32,6 +32,8 @@ abstract class IntegrationTestCase extends SystemTestCase
public static $fixture;
public static $tableData;
+ private $piwikEnvironment;
+
/**
* Implementation details:
*
@@ -86,6 +88,11 @@ abstract class IntegrationTestCase extends SystemTestCase
self::restoreDbTables(self::$tableData);
}
+ $this->piwikEnvironment = new Environment('test', $this->provideContainerConfig());
+ $this->piwikEnvironment->init();
+
+ Fixture::loadAllPlugins(null, get_class($this));
+
PiwikCache::getEagerCache()->flushAll();
PiwikCache::getTransientCache()->flushAll();
}