diff options
author | Joas Schilling <coding@schilljs.com> | 2018-01-15 14:11:02 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2018-01-15 17:54:50 +0100 |
commit | 7bc9a69c3f9eae8b67471f33b9f74dd4ab0c9b29 (patch) | |
tree | f1210284e7344a1980407d4f627c98532ce8ad88 /tests/lib/AppFramework/Http/TemplateResponseTest.php | |
parent | 9ddfccc52f6d7085bb590d7eb68e7025995a7547 (diff) | |
download | nextcloud-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.php | 19 |
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()); } |