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 | |
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')
-rw-r--r-- | tests/lib/AppFramework/DependencyInjection/DIContainerTest.php | 8 | ||||
-rw-r--r-- | tests/lib/AppFramework/Http/TemplateResponseTest.php | 19 |
2 files changed, 3 insertions, 24 deletions
diff --git a/tests/lib/AppFramework/DependencyInjection/DIContainerTest.php b/tests/lib/AppFramework/DependencyInjection/DIContainerTest.php index fd6fe84b879..d4581aaaf23 100644 --- a/tests/lib/AppFramework/DependencyInjection/DIContainerTest.php +++ b/tests/lib/AppFramework/DependencyInjection/DIContainerTest.php @@ -27,7 +27,6 @@ namespace Test\AppFramework\DependencyInjection; -use OC\AppFramework\Core\API; use OC\AppFramework\DependencyInjection\DIContainer; use \OC\AppFramework\Http\Request; use OCP\AppFramework\QueryException; @@ -49,13 +48,6 @@ class DIContainerTest extends \Test\TestCase { ->setMethods(['isAdminUser']) ->setConstructorArgs(['name']) ->getMock(); - $this->api = $this->getMockBuilder(API::class) - ->setConstructorArgs(['hi']) - ->getMock(); - } - - public function testProvidesAPI(){ - $this->assertTrue(isset($this->container['API'])); } 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()); } |