diff options
author | diosmosis <benaka@piwik.pro> | 2015-05-26 23:18:21 +0300 |
---|---|---|
committer | diosmosis <benaka@piwik.pro> | 2015-06-02 01:05:28 +0300 |
commit | 16f3355ce9b940edd5047d75424885ed9cc2734b (patch) | |
tree | ee96fce45c3766a021d30e623c822f50307a24c5 /config | |
parent | 5e8641bd3e2ef3901cb0e8ecf7a82db1b1352a25 (diff) |
Move TestingEnvironment::arrayMergeRecursiveDistinct() to TestConfig since that's where it is used.
Diffstat (limited to 'config')
-rw-r--r-- | config/environment/test.php | 10 |
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'); |