diff options
author | Robin Appelman <icewind@owncloud.com> | 2015-12-21 15:48:02 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2015-12-21 16:37:54 +0100 |
commit | ef9a231f6cafde960aaa281c5ef6c3ef4091f35f (patch) | |
tree | c43fdc0391e85d0131a1bbc7eeef6e47d820a9ee /apps/federation/tests/api | |
parent | 38a006b1e845de399ed10001d3ff9efbe76a5de5 (diff) | |
download | nextcloud-server-ef9a231f6cafde960aaa281c5ef6c3ef4091f35f.tar.gz nextcloud-server-ef9a231f6cafde960aaa281c5ef6c3ef4091f35f.zip |
Add error logging to federated sharing handshake
Diffstat (limited to 'apps/federation/tests/api')
-rw-r--r-- | apps/federation/tests/api/ocsauthapitest.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/apps/federation/tests/api/ocsauthapitest.php b/apps/federation/tests/api/ocsauthapitest.php index a334686c24e..e6a95af8585 100644 --- a/apps/federation/tests/api/ocsauthapitest.php +++ b/apps/federation/tests/api/ocsauthapitest.php @@ -28,6 +28,7 @@ use OCA\Federation\API\OCSAuthAPI; use OCA\Federation\DbHandler; use OCA\Federation\TrustedServers; use OCP\AppFramework\Http; +use OCP\ILogger; use OCP\IRequest; use OCP\Security\ISecureRandom; use Test\TestCase; @@ -49,6 +50,9 @@ class OCSAuthAPITest extends TestCase { /** @var \PHPUnit_Framework_MockObject_MockObject | DbHandler */ private $dbHandler; + /** @var \PHPUnit_Framework_MockObject_MockObject | ILogger */ + private $logger; + /** @var OCSAuthApi */ private $ocsAuthApi; @@ -63,13 +67,16 @@ class OCSAuthAPITest extends TestCase { ->disableOriginalConstructor()->getMock(); $this->jobList = $this->getMockBuilder('OC\BackgroundJob\JobList') ->disableOriginalConstructor()->getMock(); + $this->logger = $this->getMockBuilder('OCP\ILogger') + ->disableOriginalConstructor()->getMock(); $this->ocsAuthApi = new OCSAuthAPI( $this->request, $this->secureRandom, $this->jobList, $this->trustedServers, - $this->dbHandler + $this->dbHandler, + $this->logger ); } @@ -136,7 +143,8 @@ class OCSAuthAPITest extends TestCase { $this->secureRandom, $this->jobList, $this->trustedServers, - $this->dbHandler + $this->dbHandler, + $this->logger ] )->setMethods(['isValidToken'])->getMock(); |