diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-05-29 19:14:47 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-06-05 18:00:36 +0200 |
commit | 587a8df5668cca01cd7d928160661df583d5a7fe (patch) | |
tree | 9a4f3b46a33b82515d52a785260605aac2bfec2a /tests/lib | |
parent | 1c598085176e4bef12f5fbcd221ef6b832b734bb (diff) | |
download | nextcloud-server-587a8df5668cca01cd7d928160661df583d5a7fe.tar.gz nextcloud-server-587a8df5668cca01cd7d928160661df583d5a7fe.zip |
remove controller serializers
Diffstat (limited to 'tests/lib')
-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()); - } - } |