diff options
author | sgiehl <stefan@piwik.org> | 2017-01-09 21:28:30 +0300 |
---|---|---|
committer | sgiehl <stefan@piwik.org> | 2017-01-09 21:28:30 +0300 |
commit | 9681533aa6b0cf840f39cd24648097d15edadc16 (patch) | |
tree | f3e13c12bb277b5526c842e065ebd970af6f98b4 /tests/PHPUnit | |
parent | d28efb299ecba376c57604740747978b3c1c3c0b (diff) |
split tests as discussed in #10719
Diffstat (limited to 'tests/PHPUnit')
-rw-r--r-- | tests/PHPUnit/Integration/ArchiveWithNoVisitsTest.php | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/tests/PHPUnit/Integration/ArchiveWithNoVisitsTest.php b/tests/PHPUnit/Integration/ArchiveWithNoVisitsTest.php index 8f541e2d5d..f4fd8094e6 100644 --- a/tests/PHPUnit/Integration/ArchiveWithNoVisitsTest.php +++ b/tests/PHPUnit/Integration/ArchiveWithNoVisitsTest.php @@ -49,17 +49,22 @@ class ArchiveWithNoVisitsTest extends IntegrationTestCase ArchiveWithNoVisitsTest_MockArchiver::$methodsCalled = array(); } - public function test_getIdSitesToArchiveWhenNoVisits_CanBeUsedToTriggerArchiving_EvenIfSiteHasNoVisits() + public function tests_ArchivingNotTriggeredWhenNoVisits() { - // add our mock archiver instance - // TODO: should use a dummy plugin that is activated for this test explicitly, but that can be tricky, especially in the future - PluginsArchiver::$archivers['VisitsSummary'] = 'Piwik\Tests\Integration\ArchiveWithNoVisitsTest_MockArchiver'; // initiate archiving w/o adding the event and make sure no methods are called VisitsSummaryAPI::getInstance()->get($idSite = 1, 'week', '2012-01-01'); $this->assertEmpty(ArchiveWithNoVisitsTest_MockArchiver::$methodsCalled); + } + + public function test_getIdSitesToArchiveWhenNoVisits_CanBeUsedToTriggerArchiving_EvenIfSiteHasNoVisits() + { + // add our mock archiver instance + // TODO: should use a dummy plugin that is activated for this test explicitly, but that can be tricky, especially in the future + + PluginsArchiver::$archivers['VisitsSummary'] = 'Piwik\Tests\Integration\ArchiveWithNoVisitsTest_MockArchiver'; // mark our only site as should archive when no visits $eventDispatcher = $this->getEventDispatcher(); |