Пример #1
0
 public function testRun()
 {
     $this->assertTrue($this->jobList->has('OC\\Cache\\FileGlobalGC', null), 'Asserting that the job OC\\Cache\\FileGlobalGC exists before repairing');
     $this->assertTrue($this->jobList->has('OC_Cache_FileGlobalGC', null), 'Asserting that the job OC_Cache_FileGlobalGC exists before repairing');
     $repair = new \OC\Repair\DropOldJobs($this->jobList);
     $repair->run();
     $this->assertFalse($this->jobList->has('OC\\Cache\\FileGlobalGC', null), 'Asserting that the job OC\\Cache\\FileGlobalGC does not exist after repairing');
     $this->assertFalse($this->jobList->has('OC_Cache_FileGlobalGC', null), 'Asserting that the job OC_Cache_FileGlobalGC does not exist after repairing');
 }
Пример #2
0
 public function testRun()
 {
     $this->assertTrue($this->jobList->has('OC\\Cache\\FileGlobalGC', null), 'Asserting that the job OC\\Cache\\FileGlobalGC exists before repairing');
     $this->assertTrue($this->jobList->has('OC_Cache_FileGlobalGC', null), 'Asserting that the job OC_Cache_FileGlobalGC exists before repairing');
     /** @var IOutput | \PHPUnit_Framework_MockObject_MockObject $outputMock */
     $outputMock = $this->getMockBuilder('\\OCP\\Migration\\IOutput')->disableOriginalConstructor()->getMock();
     $repair = new \OC\Repair\DropOldJobs($this->jobList);
     $repair->run($outputMock);
     $this->assertFalse($this->jobList->has('OC\\Cache\\FileGlobalGC', null), 'Asserting that the job OC\\Cache\\FileGlobalGC does not exist after repairing');
     $this->assertFalse($this->jobList->has('OC_Cache_FileGlobalGC', null), 'Asserting that the job OC_Cache_FileGlobalGC does not exist after repairing');
 }