summaryrefslogtreecommitdiffstats
path: root/tests/lib/appframework
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-02-09 21:58:54 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2015-02-09 23:06:55 +0100
commitc60dabd11b2f1e182bd5c37564f271f50f4d884b (patch)
treea430680f74848cb2586eeb9a9ae4da5ddfa9cf29 /tests/lib/appframework
parent4872d6c08a67e1afecda736cd236690f326162f9 (diff)
downloadnextcloud-server-c60dabd11b2f1e182bd5c37564f271f50f4d884b.tar.gz
nextcloud-server-c60dabd11b2f1e182bd5c37564f271f50f4d884b.zip
Request requires a second parameter
Diffstat (limited to 'tests/lib/appframework')
-rw-r--r--tests/lib/appframework/controller/OCSControllerTest.php22
1 files changed, 16 insertions, 6 deletions
diff --git a/tests/lib/appframework/controller/OCSControllerTest.php b/tests/lib/appframework/controller/OCSControllerTest.php
index 8f8d57ef68e..3b4de1d7a05 100644
--- a/tests/lib/appframework/controller/OCSControllerTest.php
+++ b/tests/lib/appframework/controller/OCSControllerTest.php
@@ -36,12 +36,13 @@ class OCSControllerTest extends \Test\TestCase {
public function testCors() {
$request = new Request(
- array('server' => array('HTTP_ORIGIN' => 'test'))
+ array('server' => array('HTTP_ORIGIN' => 'test')),
+ $this->getMock('\OCP\Security\ISecureRandom')
);
- $this->controller = new ChildOCSController('app', $request, 'verbs',
+ $controller = new ChildOCSController('app', $request, 'verbs',
'headers', 100);
- $response = $this->controller->preflightedCors();
+ $response = $controller->preflightedCors();
$headers = $response->getHeaders();
@@ -54,7 +55,10 @@ class OCSControllerTest extends \Test\TestCase {
public function testXML() {
- $controller = new ChildOCSController('app', new Request);
+ $controller = new ChildOCSController('app', new Request(
+ [],
+ $this->getMock('\OCP\Security\ISecureRandom')
+ ));
$expected = "<?xml version=\"1.0\"?>\n" .
"<ocs>\n" .
" <meta>\n" .
@@ -80,7 +84,10 @@ class OCSControllerTest extends \Test\TestCase {
public function testXMLDataResponse() {
- $controller = new ChildOCSController('app', new Request);
+ $controller = new ChildOCSController('app', new Request(
+ [],
+ $this->getMock('\OCP\Security\ISecureRandom')
+ ));
$expected = "<?xml version=\"1.0\"?>\n" .
"<ocs>\n" .
" <meta>\n" .
@@ -106,7 +113,10 @@ class OCSControllerTest extends \Test\TestCase {
public function testJSON() {
- $controller = new ChildOCSController('app', new Request);
+ $controller = new ChildOCSController('app', new Request(
+ [],
+ $this->getMock('\OCP\Security\ISecureRandom')
+ ));
$expected = '{"status":"OK","statuscode":400,"message":"OK",' .
'"totalitems":"","itemsperpage":"","data":{"test":"hi"}}';
$params = [