aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/backgroundjob
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-02-17 16:49:14 +0100
committerRobin Appelman <icewind@owncloud.com>2015-02-25 15:08:40 +0100
commit74ae7b8929a7fd3f539fd15efb9533424114a480 (patch)
tree4388660851beff515a0ec78a2bea199c9a057fb2 /tests/lib/backgroundjob
parentf5b62267325415b307cf2d47b69d11d4337536e4 (diff)
downloadnextcloud-server-74ae7b8929a7fd3f539fd15efb9533424114a480.tar.gz
nextcloud-server-74ae7b8929a7fd3f539fd15efb9533424114a480.zip
Add async command system to handle asynchronous operations
Diffstat (limited to 'tests/lib/backgroundjob')
-rw-r--r--tests/lib/backgroundjob/dummyjoblist.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/lib/backgroundjob/dummyjoblist.php b/tests/lib/backgroundjob/dummyjoblist.php
index 7801269b27e..6cc690fd553 100644
--- a/tests/lib/backgroundjob/dummyjoblist.php
+++ b/tests/lib/backgroundjob/dummyjoblist.php
@@ -21,13 +21,18 @@ class DummyJobList extends \OC\BackgroundJob\JobList {
private $last = 0;
- public function __construct(){}
+ public function __construct() {
+ }
/**
* @param \OC\BackgroundJob\Job|string $job
* @param mixed $argument
*/
public function add($job, $argument = null) {
+ if (is_string($job)) {
+ /** @var \OC\BackgroundJob\Job $job */
+ $job = new $job;
+ }
$job->setArgument($argument);
if (!$this->has($job, null)) {
$this->jobs[] = $job;