Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2016-08-19 22:41:55 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2016-08-28 12:40:58 +0300
commitb6520827f704b304b0df6e0a618f28b96a3e04c7 (patch)
treecbbab31a621d348b1654989bb53b6bab3127f528 /apps/federation/tests
parent16ff207465335b624e67b9a9d0dae00ef23cd45c (diff)
Use function parameters
Diffstat (limited to 'apps/federation/tests')
-rw-r--r--apps/federation/tests/Controller/OCSAuthAPIControllerTest.php9
1 files changed, 2 insertions, 7 deletions
diff --git a/apps/federation/tests/Controller/OCSAuthAPIControllerTest.php b/apps/federation/tests/Controller/OCSAuthAPIControllerTest.php
index ba10ce57c30..2b231b4fca0 100644
--- a/apps/federation/tests/Controller/OCSAuthAPIControllerTest.php
+++ b/apps/federation/tests/Controller/OCSAuthAPIControllerTest.php
@@ -97,8 +97,6 @@ class OCSAuthAPIControllerTest extends TestCase {
$url = 'url';
- $this->request->expects($this->at(0))->method('getParam')->with('url')->willReturn($url);
- $this->request->expects($this->at(1))->method('getParam')->with('token')->willReturn($token);
$this->trustedServers
->expects($this->once())
->method('isTrustedServer')->with($url)->willReturn($isTrustedServer);
@@ -116,7 +114,7 @@ class OCSAuthAPIControllerTest extends TestCase {
}
try {
- $result = $this->ocsAuthApi->requestSharedSecret();
+ $this->ocsAuthApi->requestSharedSecret($url, $token);
$this->assertTrue($ok);
} catch (OCSForbiddenException $e) {
$this->assertFalse($ok);
@@ -143,9 +141,6 @@ class OCSAuthAPIControllerTest extends TestCase {
$url = 'url';
$token = 'token';
- $this->request->expects($this->at(0))->method('getParam')->with('url')->willReturn($url);
- $this->request->expects($this->at(1))->method('getParam')->with('token')->willReturn($token);
-
/** @var OCSAuthAPIController | \PHPUnit_Framework_MockObject_MockObject $ocsAuthApi */
$ocsAuthApi = $this->getMockBuilder('OCA\Federation\Controller\OCSAuthAPIController')
->setConstructorArgs(
@@ -181,7 +176,7 @@ class OCSAuthAPIControllerTest extends TestCase {
}
try {
- $result = $ocsAuthApi->getSharedSecret();
+ $result = $ocsAuthApi->getSharedSecret($url, $token);
$this->assertTrue($ok);
$data = $result->getData();
$this->assertSame('secret', $data['sharedSecret']);