summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-01-15 20:12:26 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2016-01-15 20:12:26 +0100
commit807cf750b3f26da3c9e504ad9d5ce165dd4f6e32 (patch)
treee1f676b2ced0b8bbcd071839c638f21675eecbdc /tests
parentfcec704174a384f93214a1f2b83bed385e763ff6 (diff)
parentf6c4b10189c6d76d94b0b01a440a326e6346c301 (diff)
downloadnextcloud-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.php9
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);