Ejemplo n.º 1
0
 public function test_purgeOutdatedArchives_Purges_WhenBrowserArchivingEnabled_AndCronArchiveTriggerPresent()
 {
     Rules::setBrowserTriggerArchiving(false);
     $_GET['trigger'] = 'archivephp';
     $wasPurged = $this->tasks->purgeOutdatedArchives();
     $this->assertTrue($wasPurged);
 }
Ejemplo n.º 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);
 }