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-26 23:18:21 +0300
committerdiosmosis <benaka@piwik.pro>2015-06-02 01:05:28 +0300
commit16f3355ce9b940edd5047d75424885ed9cc2734b (patch)
treeee96fce45c3766a021d30e623c822f50307a24c5 /config/environment
parent5e8641bd3e2ef3901cb0e8ecf7a82db1b1352a25 (diff)
Move TestingEnvironment::arrayMergeRecursiveDistinct() to TestConfig since that's where it is used.
Diffstat (limited to 'config/environment')
-rw-r--r--config/environment/test.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/config/environment/test.php b/config/environment/test.php
index 6ff1e10982..205945db67 100644
--- a/config/environment/test.php
+++ b/config/environment/test.php
@@ -19,8 +19,14 @@ return array(
'cache.eager.cache_id' => 'eagercache-test-',
// Disable loading core translations
- 'Piwik\Translation\Translator' => DI\object()
- ->constructorParameter('directories', array()),
+ 'Piwik\Translation\Translator' => DI\decorate(function ($previous, ContainerInterface $c) {
+ $testingEnvironment = $c->get('Piwik\Tests\Framework\TestingEnvironment');
+ if (!$testingEnvironment->loadRealTranslations) {
+ return new \Piwik\Translation\Translator($c->get('Piwik\Translation\Loader\LoaderInterface'), $directories = array());
+ } else {
+ return $previous;
+ }
+ }),
'Piwik\Config' => DI\decorate(function ($previous, ContainerInterface $c) {
$testingEnvironment = $c->get('Piwik\Tests\Framework\TestingEnvironment');