summaryrefslogtreecommitdiffstats
path: root/tests/lib/backgroundjob
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2013-04-24 14:38:41 +0200
committerRobin Appelman <icewind@owncloud.com>2013-04-24 14:40:49 +0200
commitb31dc10c3c4b73b08c926751effbade601c7cab8 (patch)
tree3a8cf49470008b5ac87333fd9e4523735210e953 /tests/lib/backgroundjob
parent117412272e34f73b9e9f69e1261b0d353dc12393 (diff)
downloadnextcloud-server-b31dc10c3c4b73b08c926751effbade601c7cab8.tar.gz
nextcloud-server-b31dc10c3c4b73b08c926751effbade601c7cab8.zip
Add support for the old public backgroundjob api
Diffstat (limited to 'tests/lib/backgroundjob')
-rw-r--r--tests/lib/backgroundjob/dummyjoblist.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/lib/backgroundjob/dummyjoblist.php b/tests/lib/backgroundjob/dummyjoblist.php
index 833607c15c2..d91d6b344b5 100644
--- a/tests/lib/backgroundjob/dummyjoblist.php
+++ b/tests/lib/backgroundjob/dummyjoblist.php
@@ -99,6 +99,19 @@ class DummyJobList extends \OC\BackgroundJob\JobList {
}
/**
+ * @param int $id
+ * @return Job
+ */
+ public function getById($id) {
+ foreach ($this->jobs as $job) {
+ if ($job->getId() === $id) {
+ return $job;
+ }
+ }
+ return null;
+ }
+
+ /**
* get the id of the last ran job
*
* @return int