diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-01-15 20:12:26 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-01-15 20:12:26 +0100 |
commit | 807cf750b3f26da3c9e504ad9d5ce165dd4f6e32 (patch) | |
tree | e1f676b2ced0b8bbcd071839c638f21675eecbdc /tests | |
parent | fcec704174a384f93214a1f2b83bed385e763ff6 (diff) | |
parent | f6c4b10189c6d76d94b0b01a440a326e6346c301 (diff) | |
download | nextcloud-server-807cf750b3f26da3c9e504ad9d5ce165dd4f6e32.tar.gz nextcloud-server-807cf750b3f26da3c9e504ad9d5ce165dd4f6e32.zip |
Merge pull request #21705 from owncloud/improve-background-job-message
Improve background job error message
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/backgroundjob/job.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/lib/backgroundjob/job.php b/tests/lib/backgroundjob/job.php index 912e0e13b57..12413e2c52a 100644 --- a/tests/lib/backgroundjob/job.php +++ b/tests/lib/backgroundjob/job.php @@ -18,8 +18,9 @@ class Job extends \Test\TestCase { public function testRemoveAfterException() { $jobList = new DummyJobList(); - $job = new TestJob($this, function () { - throw new \Exception(); + $e = new \Exception(); + $job = new TestJob($this, function () use ($e) { + throw $e; }); $jobList->add($job); @@ -27,8 +28,8 @@ class Job extends \Test\TestCase { ->disableOriginalConstructor() ->getMock(); $logger->expects($this->once()) - ->method('error') - ->with('Error while running background job: '); + ->method('logException') + ->with($e); $this->assertCount(1, $jobList->getAll()); $job->execute($jobList, $logger); |