public function test_purgeOutdatedArchives_PurgesCorrectTemporaryArchives_WhileKeepingNewerTemporaryArchives_WithBrowserTriggeringDisabled()
 {
     $this->disableBrowserTriggeredArchiving();
     $deletedRowCount = $this->archivePurger->purgeOutdatedArchives($this->february);
     self::$fixture->assertTemporaryArchivesPurged($browserTriggeringEnabled = false, $this->february);
     self::$fixture->assertCustomRangesNotPurged($this->february);
     self::$fixture->assertTemporaryArchivesNotPurged($this->january);
     $this->assertEquals(5 * RawArchiveDataWithTempAndInvalidated::ROWS_PER_ARCHIVE, $deletedRowCount);
 }
 public function test_ExecutingCommandWithExcludeOptions_SkipsAppropriatePurging()
 {
     $result = $this->applicationTester->run(array('command' => 'core:purge-old-archive-data', 'dates' => array('2015-01-14'), '--exclude-outdated' => true, '--exclude-invalidated' => true, '--exclude-ranges' => true, '--skip-optimize-tables' => true, '-vvv' => true));
     $this->assertEquals(0, $result, $this->getCommandDisplayOutputErrorMessage());
     self::$fixture->assertInvalidatedArchivesNotPurged(self::$fixture->january);
     self::$fixture->assertTemporaryArchivesNotPurged(self::$fixture->january);
     self::$fixture->assertCustomRangesNotPurged(self::$fixture->january);
     $this->assertContains("Skipping purge outdated archive data.", $this->applicationTester->getDisplay());
     $this->assertContains("Skipping purge invalidated archive data.", $this->applicationTester->getDisplay());
     $this->assertContains("Skipping OPTIMIZE TABLES.", $this->applicationTester->getDisplay());
 }