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);
 }
Exemple #2
0
 public function purgeInvalidatedArchives()
 {
     $archivesToPurge = new ArchivesToPurgeDistributedList();
     foreach ($archivesToPurge->getAllAsDates() as $date) {
         $this->archivePurger->purgeInvalidatedArchivesFrom($date);
         $archivesToPurge->removeDate($date);
     }
 }