diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-05-06 20:25:41 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-05-11 17:54:08 +0200 |
commit | cb666c18d6dd6863495b1da5fe979fdc5fa42204 (patch) | |
tree | 2970bff9418433853c271ffdec2361e6cf54b3b3 /tests/lib | |
parent | c590244fa1635906b1b3d82bf0c2f8289e562bd9 (diff) | |
download | nextcloud-server-cb666c18d6dd6863495b1da5fe979fdc5fa42204.tar.gz nextcloud-server-cb666c18d6dd6863495b1da5fe979fdc5fa42204.zip |
rename formatter to responder, formatResponse to buildResponse
Diffstat (limited to 'tests/lib')
-rw-r--r-- | tests/lib/appframework/controller/ControllerTest.php | 10 | ||||
-rw-r--r-- | tests/lib/appframework/http/DispatcherTest.php | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/tests/lib/appframework/controller/ControllerTest.php b/tests/lib/appframework/controller/ControllerTest.php index 4785c686f27..0696d00a425 100644 --- a/tests/lib/appframework/controller/ControllerTest.php +++ b/tests/lib/appframework/controller/ControllerTest.php @@ -38,7 +38,7 @@ class ToUpperCaseSerializer implements IResponseSerializer { class ChildController extends Controller { public function custom($in) { - $this->registerFormatter('json', function ($response) { + $this->registerResponder('json', function ($response) { return new JSONResponse(array(strlen($response))); }); @@ -155,12 +155,12 @@ class ControllerTest extends \PHPUnit_Framework_TestCase { * @expectedException \DomainException */ public function testFormatResonseInvalidFormat() { - $this->controller->formatResponse(null, 'test'); + $this->controller->buildResponse(null, 'test'); } public function testFormat() { - $response = $this->controller->formatResponse(array('hi'), 'json'); + $response = $this->controller->buildResponse(array('hi'), 'json'); $this->assertEquals(array('hi'), $response->getData()); } @@ -168,7 +168,7 @@ class ControllerTest extends \PHPUnit_Framework_TestCase { public function testCustomFormatter() { $response = $this->controller->custom('hi'); - $response = $this->controller->formatResponse($response, 'json'); + $response = $this->controller->buildResponse($response, 'json'); $this->assertEquals(array(2), $response->getData()); } @@ -176,7 +176,7 @@ class ControllerTest extends \PHPUnit_Framework_TestCase { public function testCustomSerializer() { $response = $this->controller->serializer('hi'); - $response = $this->controller->formatResponse($response, 'json'); + $response = $this->controller->buildResponse($response, 'json'); $this->assertEquals(array('HI'), $response->getData()); } diff --git a/tests/lib/appframework/http/DispatcherTest.php b/tests/lib/appframework/http/DispatcherTest.php index d1296f9cf0f..08fb374cfa9 100644 --- a/tests/lib/appframework/http/DispatcherTest.php +++ b/tests/lib/appframework/http/DispatcherTest.php @@ -41,7 +41,7 @@ class TestController extends Controller { * @param bool $bool */ public function exec($int, $bool) { - $this->registerFormatter('text', function($in) { + $this->registerResponder('text', function($in) { return new JSONResponse(array('text' => $in)); }); return array($int, $bool); |