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
path: root/tests
diff options
context:
space:
mode:
authorThomas Steur <thomas.steur@gmail.com>2016-04-06 00:34:07 +0300
committerThomas Steur <thomas.steur@gmail.com>2016-04-06 00:34:07 +0300
commitfd650c6cf7c4c65569ec1195545db79f02c832c8 (patch)
treea5e84a64a049eb6af47261f3033f87907ab569bf /tests
parent2be3eb29c48748236411cf98979876a1dc54f03e (diff)
added test case
Diffstat (limited to 'tests')
-rw-r--r--tests/PHPUnit/Integration/CronArchiveTest.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/PHPUnit/Integration/CronArchiveTest.php b/tests/PHPUnit/Integration/CronArchiveTest.php
index c8f97754fc..1fc6eaa075 100644
--- a/tests/PHPUnit/Integration/CronArchiveTest.php
+++ b/tests/PHPUnit/Integration/CronArchiveTest.php
@@ -140,6 +140,34 @@ LOG;
$this->assertStringMatchesFormat($expected, $logger->output);
}
+ public function test_shouldNotStopProcessingWhenOneSiteIsInvalid()
+ {
+ \Piwik\Tests\Framework\Mock\FakeCliMulti::$specifiedResults = array(
+ '/method=API.get/' => serialize(array(array('nb_visits' => 1)))
+ );
+
+ Fixture::createWebsite('2014-12-12 00:01:02');
+
+ $logger = new FakeLogger();
+
+ $archiver = new CronArchive(null, $logger);
+ $archiver->shouldArchiveSpecifiedSites = array(99999, 1);
+ $archiver->init();
+ $archiver->run();
+
+ $expected = <<<LOG
+- Will process 2 websites (--force-idsites)
+Will ignore websites and help finish a previous started queue instead. IDs: 1
+---------------------------
+START
+Starting Piwik reports archiving...
+Will pre-process for website id = 1, period = day, date = last52
+- pre-processing all visits
+LOG;
+
+ $this->assertContains($expected, $logger->output);
+ }
+
public function provideContainerConfig()
{
return array(