public function test_purgeArchivesWithPeriodRange_PurgesAllRangeArchives()
 {
     $deletedRowCount = $this->archivePurger->purgeArchivesWithPeriodRange($this->february);
     self::$fixture->assertCustomRangesPurged($this->february);
     self::$fixture->assertCustomRangesNotPurged($this->january);
     $this->assertEquals(3 * 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());
 }