summaryrefslogtreecommitdiffstats
path: root/tests/lib/appframework/http/TemplateResponseTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/appframework/http/TemplateResponseTest.php')
-rw-r--r--tests/lib/appframework/http/TemplateResponseTest.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/lib/appframework/http/TemplateResponseTest.php b/tests/lib/appframework/http/TemplateResponseTest.php
index a583d9da14f..0b158edff6f 100644
--- a/tests/lib/appframework/http/TemplateResponseTest.php
+++ b/tests/lib/appframework/http/TemplateResponseTest.php
@@ -25,6 +25,7 @@
namespace OC\AppFramework\Http;
use OCP\AppFramework\Http\TemplateResponse;
+use OCP\AppFramework\Http;
class TemplateResponseTest extends \PHPUnit_Framework_TestCase {
@@ -98,4 +99,13 @@ class TemplateResponseTest extends \PHPUnit_Framework_TestCase {
$this->assertEquals($render, $this->tpl->getRenderAs());
}
+ public function testChainability() {
+ $params = array('hi' => 'yo');
+ $this->tpl->setParams($params)
+ ->setStatus(Http::STATUS_NOT_FOUND);
+
+ $this->assertEquals(Http::STATUS_NOT_FOUND, $this->tpl->getStatus());
+ $this->assertEquals(array('hi' => 'yo'), $this->tpl->getParams());
+ }
+
}