summaryrefslogtreecommitdiffstats
path: root/tests/lib/AppFramework/Http/TemplateResponseTest.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2018-01-15 14:11:02 +0100
committerMorris Jobke <hey@morrisjobke.de>2018-01-15 17:54:50 +0100
commit7bc9a69c3f9eae8b67471f33b9f74dd4ab0c9b29 (patch)
treef1210284e7344a1980407d4f627c98532ce8ad88 /tests/lib/AppFramework/Http/TemplateResponseTest.php
parent9ddfccc52f6d7085bb590d7eb68e7025995a7547 (diff)
downloadnextcloud-server-7bc9a69c3f9eae8b67471f33b9f74dd4ab0c9b29.tar.gz
nextcloud-server-7bc9a69c3f9eae8b67471f33b9f74dd4ab0c9b29.zip
Remove deprecated core API
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests/lib/AppFramework/Http/TemplateResponseTest.php')
-rw-r--r--tests/lib/AppFramework/Http/TemplateResponseTest.php19
1 files changed, 3 insertions, 16 deletions
diff --git a/tests/lib/AppFramework/Http/TemplateResponseTest.php b/tests/lib/AppFramework/Http/TemplateResponseTest.php
index 4f779e8c697..c06497ef5d5 100644
--- a/tests/lib/AppFramework/Http/TemplateResponseTest.php
+++ b/tests/lib/AppFramework/Http/TemplateResponseTest.php
@@ -35,29 +35,16 @@ class TemplateResponseTest extends \Test\TestCase {
*/
private $tpl;
- /**
- * @var \OCP\AppFramework\IApi
- */
- private $api;
-
protected function setUp() {
parent::setUp();
- $this->api = $this->getMockBuilder('OC\AppFramework\Core\API')
- ->setMethods(['getAppName'])
- ->setConstructorArgs(['test'])
- ->getMock();
- $this->api->expects($this->any())
- ->method('getAppName')
- ->will($this->returnValue('app'));
-
- $this->tpl = new TemplateResponse($this->api, 'home');
+ $this->tpl = new TemplateResponse('app', 'home');
}
public function testSetParamsConstructor(){
$params = array('hi' => 'yo');
- $this->tpl = new TemplateResponse($this->api, 'home', $params);
+ $this->tpl = new TemplateResponse('app', 'home', $params);
$this->assertEquals(array('hi' => 'yo'), $this->tpl->getParams());
}
@@ -65,7 +52,7 @@ class TemplateResponseTest extends \Test\TestCase {
public function testSetRenderAsConstructor(){
$renderAs = 'myrender';
- $this->tpl = new TemplateResponse($this->api, 'home', array(), $renderAs);
+ $this->tpl = new TemplateResponse('app', 'home', array(), $renderAs);
$this->assertEquals($renderAs, $this->tpl->getRenderAs());
}