コード例 #1
0
 public function test_purgeInvalidatedArchivesFrom_PurgesAllInvalidatedArchives_AndMarksDatesAndSitesAsInvalidated()
 {
     $deletedRowCount = $this->archivePurger->purgeInvalidatedArchivesFrom($this->february);
     self::$fixture->assertInvalidatedArchivesPurged($this->february);
     self::$fixture->assertInvalidatedArchivesNotPurged($this->january);
     $this->assertEquals(4 * RawArchiveDataWithTempAndInvalidated::ROWS_PER_ARCHIVE, $deletedRowCount);
 }
コード例 #2
0
 public function test_purgeInvalidatedArchives_PurgesCorrectInvalidatedArchives_AndOnlyPurgesDataForDatesAndSites_InInvalidatedReportsDistributedList()
 {
     $this->setUpInvalidatedReportsDistributedList($dates = array($this->february));
     $this->tasks->purgeInvalidatedArchives();
     self::$fixture->assertInvalidatedArchivesPurged($this->february);
     self::$fixture->assertInvalidatedArchivesNotPurged($this->january);
     // assert invalidated reports distributed list has changed
     $archivesToPurgeDistributedList = new ArchivesToPurgeDistributedList();
     $yearMonths = $archivesToPurgeDistributedList->getAll();
     $this->assertEmpty($yearMonths);
 }
コード例 #3
0
 public function test_ExecutingCommandWithSpecificDate_PurgesArchiveTableForDate()
 {
     $result = $this->applicationTester->run(array('command' => 'core:purge-old-archive-data', 'dates' => array('2015-01-14'), '-vvv' => true));
     $this->assertEquals(0, $result, $this->getCommandDisplayOutputErrorMessage());
     self::$fixture->assertInvalidatedArchivesPurged(self::$fixture->january);
     self::$fixture->assertTemporaryArchivesPurged($isBrowserTriggeredArchivingEnabled = true, self::$fixture->january);
     self::$fixture->assertCustomRangesPurged(self::$fixture->january);
     self::$fixture->assertInvalidatedArchivesNotPurged(self::$fixture->february);
     self::$fixture->assertTemporaryArchivesNotPurged(self::$fixture->february);
     self::$fixture->assertCustomRangesNotPurged(self::$fixture->february);
 }