diff options
author | Robin Appelman <icewind@owncloud.com> | 2015-02-17 16:49:14 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2015-02-25 15:08:40 +0100 |
commit | 74ae7b8929a7fd3f539fd15efb9533424114a480 (patch) | |
tree | 4388660851beff515a0ec78a2bea199c9a057fb2 /tests/lib/backgroundjob | |
parent | f5b62267325415b307cf2d47b69d11d4337536e4 (diff) | |
download | nextcloud-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.php | 7 |
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; |