diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-06-06 10:33:16 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-06-06 10:33:16 +0200 |
commit | 3a7b30795c56f1debdb7a9dcd51578b711c2f622 (patch) | |
tree | 0a76d4dd7cdec91987b27337852f4398d7efc022 /tests | |
parent | ff651a3e0d764e72ec3146c0163c80b3a872a05a (diff) | |
parent | 587a8df5668cca01cd7d928160661df583d5a7fe (diff) | |
download | nextcloud-server-3a7b30795c56f1debdb7a9dcd51578b711c2f622.tar.gz nextcloud-server-3a7b30795c56f1debdb7a9dcd51578b711c2f622.zip |
Merge pull request #8783 from owncloud/remove-serializers
Remove controller serializers
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/appframework/controller/ControllerTest.php | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/tests/lib/appframework/controller/ControllerTest.php b/tests/lib/appframework/controller/ControllerTest.php index 3c1716a91d8..65144e78f53 100644 --- a/tests/lib/appframework/controller/ControllerTest.php +++ b/tests/lib/appframework/controller/ControllerTest.php @@ -27,15 +27,8 @@ namespace OCP\AppFramework; use OC\AppFramework\Http\Request; use OCP\AppFramework\Http\TemplateResponse; use OCP\AppFramework\Http\JSONResponse; -use OCP\AppFramework\Http\IResponseSerializer; -class ToUpperCaseSerializer implements IResponseSerializer { - public function serialize($response) { - return array(strtoupper($response)); - } -} - class ChildController extends Controller { public function custom($in) { $this->registerResponder('json', function ($response) { @@ -44,12 +37,6 @@ class ChildController extends Controller { return $in; } - - public function serializer($in) { - $this->registerSerializer(new ToUpperCaseSerializer()); - - return $in; - } }; class ControllerTest extends \PHPUnit_Framework_TestCase { @@ -170,16 +157,9 @@ class ControllerTest extends \PHPUnit_Framework_TestCase { $response = $this->controller->custom('hi'); $response = $this->controller->buildResponse($response, 'json'); - $this->assertEquals(array(2), $response->getData()); + $this->assertEquals(array(2), $response->getData()); } - public function testCustomSerializer() { - $response = $this->controller->serializer('hi'); - $response = $this->controller->buildResponse($response, 'json'); - - $this->assertEquals(array('HI'), $response->getData()); - } - } |