diff options
author | diosmosis <benaka@piwik.pro> | 2015-05-29 09:06:58 +0300 |
---|---|---|
committer | diosmosis <benaka@piwik.pro> | 2015-06-02 01:05:28 +0300 |
commit | 12081b361d02e6c937b3c0a9b7d840f815c076b8 (patch) | |
tree | fc17aa86d34cf8f0c28d6cdd468de22344c46eef /tests/PHPUnit/System/ArchiveCronTest.php | |
parent | fca0ce78795d22b492b19e576281697cb4c65288 (diff) |
In ArchiveCronTest make sure to use real translations, because for some reason cron archiver will fail when archiving segments if translations aren't available. Segment archiving requests return the token General_DateRangeFromTo w/o anything else (only some of them).
Diffstat (limited to 'tests/PHPUnit/System/ArchiveCronTest.php')
-rw-r--r-- | tests/PHPUnit/System/ArchiveCronTest.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/PHPUnit/System/ArchiveCronTest.php b/tests/PHPUnit/System/ArchiveCronTest.php index e2c979aa7c..9c8be19798 100644 --- a/tests/PHPUnit/System/ArchiveCronTest.php +++ b/tests/PHPUnit/System/ArchiveCronTest.php @@ -7,6 +7,7 @@ */ namespace Piwik\Tests\System; +use Interop\Container\ContainerInterface; use Piwik\Date; use Piwik\Plugins\SitesManager\API; use Piwik\Tests\Framework\TestCase\SystemTestCase; @@ -162,7 +163,13 @@ class ArchiveCronTest extends SystemTestCase public static function provideContainerConfigBeforeClass() { return array( - 'Psr\Log\LoggerInterface' => \DI\get('Monolog\Logger') + 'Psr\Log\LoggerInterface' => \DI\get('Monolog\Logger'), + + // for some reason, w/o real translations archiving segments in CronArchive fails. the data returned by CliMulti + // is a translation token, and nothing else. + 'Piwik\Translation\Translator' => function (ContainerInterface $c) { + return new \Piwik\Translation\Translator($c->get('Piwik\Translation\Loader\LoaderInterface')); + } ); } } |