diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-02-17 13:17:04 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-02-17 13:17:04 +0100 |
commit | 76c511de92f1b4dc6dcc31ac5ae15ffade29bb18 (patch) | |
tree | afa1983f7e1d9ad6bf180321eb2408c19082cac4 /tests/lib/appframework/controller/OCSControllerTest.php | |
parent | e8f16db49d3da864bf3d919918b79dcf59e0c10c (diff) | |
parent | cebf9f6a5a2d75ea682f109486ada3d5558fb6a2 (diff) | |
download | nextcloud-server-76c511de92f1b4dc6dcc31ac5ae15ffade29bb18.tar.gz nextcloud-server-76c511de92f1b4dc6dcc31ac5ae15ffade29bb18.zip |
Merge pull request #14056 from owncloud/refactor/13976
Refactor OC_Request into TrustedDomainHelper and IRequest
Diffstat (limited to 'tests/lib/appframework/controller/OCSControllerTest.php')
-rw-r--r-- | tests/lib/appframework/controller/OCSControllerTest.php | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/tests/lib/appframework/controller/OCSControllerTest.php b/tests/lib/appframework/controller/OCSControllerTest.php index 3b4de1d7a05..11a9d45eb92 100644 --- a/tests/lib/appframework/controller/OCSControllerTest.php +++ b/tests/lib/appframework/controller/OCSControllerTest.php @@ -33,11 +33,17 @@ class ChildOCSController extends OCSController {} class OCSControllerTest extends \Test\TestCase { + private $controller; public function testCors() { $request = new Request( - array('server' => array('HTTP_ORIGIN' => 'test')), - $this->getMock('\OCP\Security\ISecureRandom') + [ + 'server' => [ + 'HTTP_ORIGIN' => 'test', + ], + ], + $this->getMock('\OCP\Security\ISecureRandom'), + $this->getMock('\OCP\IConfig') ); $controller = new ChildOCSController('app', $request, 'verbs', 'headers', 100); @@ -57,7 +63,8 @@ class OCSControllerTest extends \Test\TestCase { public function testXML() { $controller = new ChildOCSController('app', new Request( [], - $this->getMock('\OCP\Security\ISecureRandom') + $this->getMock('\OCP\Security\ISecureRandom'), + $this->getMock('\OCP\IConfig') )); $expected = "<?xml version=\"1.0\"?>\n" . "<ocs>\n" . @@ -86,7 +93,8 @@ class OCSControllerTest extends \Test\TestCase { public function testXMLDataResponse() { $controller = new ChildOCSController('app', new Request( [], - $this->getMock('\OCP\Security\ISecureRandom') + $this->getMock('\OCP\Security\ISecureRandom'), + $this->getMock('\OCP\IConfig') )); $expected = "<?xml version=\"1.0\"?>\n" . "<ocs>\n" . @@ -115,7 +123,8 @@ class OCSControllerTest extends \Test\TestCase { public function testJSON() { $controller = new ChildOCSController('app', new Request( [], - $this->getMock('\OCP\Security\ISecureRandom') + $this->getMock('\OCP\Security\ISecureRandom'), + $this->getMock('\OCP\IConfig') )); $expected = '{"status":"OK","statuscode":400,"message":"OK",' . '"totalitems":"","itemsperpage":"","data":{"test":"hi"}}'; |