]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix the test to expect the new behaviour
authorJoas Schilling <nickvergessen@owncloud.com>
Fri, 18 Dec 2015 14:05:32 +0000 (15:05 +0100)
committerJoas Schilling <nickvergessen@owncloud.com>
Fri, 18 Dec 2015 14:05:32 +0000 (15:05 +0100)
tests/lib/backgroundjob/job.php

index fec9b0a792d3cf198d0fb72ccfcca802687d8d1f..912e0e13b57b6a0719d21cae36312ca70c4b52b9 100644 (file)
@@ -23,10 +23,17 @@ class Job extends \Test\TestCase {
                });
                $jobList->add($job);
 
+               $logger = $this->getMockBuilder('OCP\ILogger')
+                       ->disableOriginalConstructor()
+                       ->getMock();
+               $logger->expects($this->once())
+                       ->method('error')
+                       ->with('Error while running background job: ');
+
                $this->assertCount(1, $jobList->getAll());
-               $job->execute($jobList);
+               $job->execute($jobList, $logger);
                $this->assertTrue($this->run);
-               $this->assertCount(0, $jobList->getAll());
+               $this->assertCount(1, $jobList->getAll());
        }
 
        public function markRun() {