diff options
author | Björn Schießle <bjoern@schiessle.org> | 2015-11-19 17:49:43 +0100 |
---|---|---|
committer | Björn Schießle <bjoern@schiessle.org> | 2015-11-20 15:48:20 +0100 |
commit | a63a1043b6a40193a44d2fb1b702a775bb761c8d (patch) | |
tree | 74aa72a8ec9e39bbfc4a3d427f0abf1e8bf4ed5d /apps/federation/backgroundjob | |
parent | f6446a64b62e964e043995f6bfeb2118a7dc489a (diff) | |
download | nextcloud-server-a63a1043b6a40193a44d2fb1b702a775bb761c8d.tar.gz nextcloud-server-a63a1043b6a40193a44d2fb1b702a775bb761c8d.zip |
unit tests
Diffstat (limited to 'apps/federation/backgroundjob')
-rw-r--r-- | apps/federation/backgroundjob/getsharedsecret.php | 14 | ||||
-rw-r--r-- | apps/federation/backgroundjob/requestsharedsecret.php | 10 |
2 files changed, 21 insertions, 3 deletions
diff --git a/apps/federation/backgroundjob/getsharedsecret.php b/apps/federation/backgroundjob/getsharedsecret.php index 88f2a51045a..eb55fa2d6ab 100644 --- a/apps/federation/backgroundjob/getsharedsecret.php +++ b/apps/federation/backgroundjob/getsharedsecret.php @@ -110,10 +110,20 @@ class GetSharedSecret extends QueuedJob{ $target = $this->argument['url']; // only execute if target is still in the list of trusted domains if ($this->trustedServers->isTrustedServer($target)) { - parent::execute($jobList, $logger); + $this->parentExecute($jobList, $logger); } } + /** + * call execute() method of parent + * + * @param JobList $jobList + * @param ILogger $logger + */ + protected function parentExecute($jobList, $logger) { + parent::execute($jobList, $logger); + } + protected function run($argument) { $target = $argument['url']; $source = $this->urlGenerator->getAbsoluteURL('/'); @@ -146,7 +156,7 @@ class GetSharedSecret extends QueuedJob{ && $status !== Http::STATUS_FORBIDDEN ) { $this->jobList->add( - 'OCA\Federation\Backgroundjob\GetSharedSecret', + 'OCA\Federation\BackgroundJob\GetSharedSecret', $argument ); } else { diff --git a/apps/federation/backgroundjob/requestsharedsecret.php b/apps/federation/backgroundjob/requestsharedsecret.php index f5685e2e0c2..24d8adada11 100644 --- a/apps/federation/backgroundjob/requestsharedsecret.php +++ b/apps/federation/backgroundjob/requestsharedsecret.php @@ -106,10 +106,18 @@ class RequestSharedSecret extends QueuedJob { $target = $this->argument['url']; // only execute if target is still in the list of trusted domains if ($this->trustedServers->isTrustedServer($target)) { - parent::execute($jobList, $logger); + $this->parentExecute($jobList, $logger); } } + /** + * @param JobList $jobList + * @param ILogger $logger + */ + protected function parentExecute($jobList, $logger) { + parent::execute($jobList, $logger); + } + protected function run($argument) { $target = $argument['url']; |