|
10 | 10 | namespace Piwik\Tests\Integration\CronArchive;
|
11 | 11 |
|
12 | 12 | use Piwik\ArchiveProcessor\Rules;
|
13 |
| -use Piwik\CliMulti\RequestParser; |
14 | 13 | use Piwik\Common;
|
15 | 14 | use Piwik\Config;
|
16 | 15 | use Piwik\Period\Day;
|
@@ -67,7 +66,6 @@ public function testConsumerIgnoresPeriodsThatHaveBeenDisabledInApi()
|
67 | 66 | new Model(),
|
68 | 67 | new SegmentArchiving(),
|
69 | 68 | $cronArchive,
|
70 |
| - new RequestParser(true), |
71 | 69 | $archiveFilter
|
72 | 70 | );
|
73 | 71 |
|
@@ -166,13 +164,12 @@ public function testInvalidateConsumeOrder()
|
166 | 164 |
|
167 | 165 | $queueConsumer = new QueueConsumer(
|
168 | 166 | StaticContainer::get(LoggerInterface::class),
|
169 |
| - new FixedSiteIds([1,2,3]), |
| 167 | + new FixedSiteIds([1, 2, 3]), |
170 | 168 | 3,
|
171 | 169 | 24,
|
172 | 170 | new Model(),
|
173 | 171 | new SegmentArchiving(),
|
174 | 172 | $cronArchive,
|
175 |
| - new RequestParser(true), |
176 | 173 | $archiveFilter
|
177 | 174 | );
|
178 | 175 |
|
@@ -354,13 +351,12 @@ public function testInvalidateConsumeOrder()
|
354 | 351 |
|
355 | 352 | $queueConsumer = new QueueConsumer(
|
356 | 353 | StaticContainer::get(LoggerInterface::class),
|
357 |
| - new FixedSiteIds([1,2,3]), |
| 354 | + new FixedSiteIds([1, 2, 3]), |
358 | 355 | 3,
|
359 | 356 | 24,
|
360 | 357 | new Model(),
|
361 | 358 | new SegmentArchiving(),
|
362 | 359 | $cronArchive,
|
363 |
| - new RequestParser(true), |
364 | 360 | $archiveFilter
|
365 | 361 | );
|
366 | 362 |
|
@@ -482,7 +478,6 @@ public function testPluginInvalidationDeletedIfUsableArchiveExists()
|
482 | 478 | new Model(),
|
483 | 479 | new SegmentArchiving(),
|
484 | 480 | $cronArchive,
|
485 |
| - new RequestParser(true), |
486 | 481 | $archiveFilter
|
487 | 482 | );
|
488 | 483 |
|
@@ -563,7 +558,6 @@ public function testSkipSegmentsToday()
|
563 | 558 | new Model(),
|
564 | 559 | new SegmentArchiving(),
|
565 | 560 | $cronArchive,
|
566 |
| - new RequestParser(true), |
567 | 561 | $archiveFilter
|
568 | 562 | );
|
569 | 563 |
|
@@ -679,7 +673,6 @@ public function testMaxWebsitesToProcess()
|
679 | 673 | new Model(),
|
680 | 674 | new SegmentArchiving(),
|
681 | 675 | $cronArchive,
|
682 |
| - new RequestParser(true), |
683 | 676 | $archiveFilter
|
684 | 677 | );
|
685 | 678 | $this->assertNull($queueConsumer->setMaxSitesToProcess());
|
@@ -822,7 +815,6 @@ public function testCanSkipArchiveBecauseNoPointReturnsTrueIfDateRangeHasNoVisit
|
822 | 815 | new Model(),
|
823 | 816 | new SegmentArchiving(),
|
824 | 817 | $cronArchive,
|
825 |
| - new RequestParser(true), |
826 | 818 | $archiveFilter
|
827 | 819 | );
|
828 | 820 |
|
@@ -851,7 +843,6 @@ public function testCanSkipArchiveBecauseNoPointReturnsFalseIfDateRangeHasVisits
|
851 | 843 | new Model(),
|
852 | 844 | new SegmentArchiving(),
|
853 | 845 | new CronArchive(),
|
854 |
| - new RequestParser(true), |
855 | 846 | $this->makeTestArchiveFilter()
|
856 | 847 | );
|
857 | 848 |
|
@@ -880,7 +871,6 @@ public function testUsableArchiveExistsReturnsTrueIfDateRangeHasVisitsAndPeriodI
|
880 | 871 | new Model(),
|
881 | 872 | new SegmentArchiving(),
|
882 | 873 | new CronArchive(),
|
883 |
| - new RequestParser(true), |
884 | 874 | $this->makeTestArchiveFilter()
|
885 | 875 | );
|
886 | 876 |
|
@@ -916,7 +906,6 @@ public function testUsableArchiveExistsReturnsTrueIfDateRangeHasVisitsAndPeriodI
|
916 | 906 | new Model(),
|
917 | 907 | new SegmentArchiving(),
|
918 | 908 | new CronArchive(),
|
919 |
| - new RequestParser(true), |
920 | 909 | $this->makeTestArchiveFilter()
|
921 | 910 | );
|
922 | 911 |
|
@@ -955,7 +944,6 @@ public function testCanSkipArchiveBecauseNoPointReturnsFalseIfDateRangeHasVisits
|
955 | 944 | new Model(),
|
956 | 945 | new SegmentArchiving(),
|
957 | 946 | new CronArchive(),
|
958 |
| - new RequestParser(true), |
959 | 947 | $this->makeTestArchiveFilter()
|
960 | 948 | );
|
961 | 949 |
|
@@ -991,7 +979,6 @@ public function testCanSkipArchiveBecauseNoPointReturnsTrueSegmentArchivingForPl
|
991 | 979 | new Model(),
|
992 | 980 | new SegmentArchiving(),
|
993 | 981 | new CronArchive(),
|
994 |
| - new RequestParser(true), |
995 | 982 | $this->makeTestArchiveFilter()
|
996 | 983 | );
|
997 | 984 |
|
@@ -1115,10 +1102,9 @@ public function testShouldSkipArchiveBecauseLowerPeriodOrSegmentIsInProgress($ex
|
1115 | 1102 | Rules::setBrowserTriggerArchiving(true);
|
1116 | 1103 |
|
1117 | 1104 | $this->insertInvalidations($existingInvalidations);
|
1118 |
| - $cliRequestProcessor = $this->getMockRequestParser([]); |
1119 | 1105 |
|
1120 | 1106 | /** @var QueueConsumer $queueConsumer */
|
1121 |
| - $queueConsumer = $this->getQueueConsumerWithMocks($cliRequestProcessor); |
| 1107 | + $queueConsumer = $this->getQueueConsumerWithMocks(); |
1122 | 1108 |
|
1123 | 1109 | $periods = array_flip(Piwik::$idPeriods);
|
1124 | 1110 |
|
@@ -1394,23 +1380,13 @@ private function getMockCronArchive()
|
1394 | 1380 | ->getMock();
|
1395 | 1381 | }
|
1396 | 1382 |
|
1397 |
| - private function getMockRequestParser($cliMultiProcesses) |
1398 |
| - { |
1399 |
| - $mock = $this->getMockBuilder(RequestParser::class) |
1400 |
| - ->disableOriginalConstructor() |
1401 |
| - ->onlyMethods(['getInProgressArchivingCommands']) |
1402 |
| - ->getMock(); |
1403 |
| - $mock->method('getInProgressArchivingCommands')->willReturn($cliMultiProcesses); |
1404 |
| - return $mock; |
1405 |
| - } |
1406 |
| - |
1407 |
| - private function getQueueConsumerWithMocks($cliRequestProcessor) |
| 1383 | + private function getQueueConsumerWithMocks() |
1408 | 1384 | {
|
1409 | 1385 | $mockCronArchive = $this->getMockBuilder(CronArchive::class)
|
1410 | 1386 | ->disableOriginalConstructor()
|
1411 | 1387 | ->getMock();
|
1412 | 1388 |
|
1413 |
| - return new QueueConsumer(new NullLogger(), null, null, null, new Model(), new SegmentArchiving(), $mockCronArchive, $cliRequestProcessor); |
| 1389 | + return new QueueConsumer(new NullLogger(), null, null, null, new Model(), new SegmentArchiving(), $mockCronArchive); |
1414 | 1390 | }
|
1415 | 1391 |
|
1416 | 1392 | protected static function configureFixture($fixture)
|
|
0 commit comments