diff options
author | Sean Molenaar <SMillerDev@users.noreply.github.com> | 2018-03-18 15:01:08 +0100 |
---|---|---|
committer | Bernhard Posselt <BernhardPosselt@users.noreply.github.com> | 2018-03-18 15:01:08 +0100 |
commit | 17e85dd5079b7ee0b1f18a450b66ec5df3cf5eb3 (patch) | |
tree | 4a4ddbea25429a4a9d82b8b28cd935d8838b30f3 /tests/Unit/Controller/PageControllerTest.php | |
parent | 2de169e43a17bdb6e1d19054e76de3ce7e220052 (diff) |
Unit: Fix unittests (#278)
* Unit: Fix unittests
Issue #171
* Tests: Move test namespace to the expected nextcloud namespace
Diffstat (limited to 'tests/Unit/Controller/PageControllerTest.php')
-rw-r--r-- | tests/Unit/Controller/PageControllerTest.php | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/tests/Unit/Controller/PageControllerTest.php b/tests/Unit/Controller/PageControllerTest.php index 9923befb4..0ab433f05 100644 --- a/tests/Unit/Controller/PageControllerTest.php +++ b/tests/Unit/Controller/PageControllerTest.php @@ -11,8 +11,9 @@ * @copyright Bernhard Posselt 2012, 2014 */ -namespace OCA\News\Controller; +namespace OCA\News\Tests\Unit\Controller; +use OCA\News\Controller\PageController; use \OCA\News\Db\FeedType; @@ -64,7 +65,7 @@ class PageControllerTest extends \PHPUnit_Framework_TestCase { ->disableOriginalConstructor() ->getMock(); $this->appConfig = $this->getMockBuilder( - '\OCA\News\Config\AppConfig') + '\OCA\News\Config\Config') ->disableOriginalConstructor() ->getMock(); $this->config = $this->getMockBuilder( @@ -270,28 +271,6 @@ class PageControllerTest extends \PHPUnit_Framework_TestCase { } - public function testManifest(){ - $this->appConfig->expects($this->once()) - ->method('getConfig') - ->will($this->returnValue($this->configData)); - $this->l10n->expects($this->once()) - ->method('getLanguageCode') - ->will($this->returnValue('de_DE')); - - $result = $this->controller->manifest()->getData(); - $this->assertEquals($this->configData['name'], $result['name']); - $this->assertEquals('web', $result['type']); - $this->assertEquals( - $this->configData['description'], $result['description'] - ); - $this->assertEquals('de-DE', $result['default_locale']); - $this->assertEquals( - $this->configData['homepage'], $result['developer']['url'] - ); - $this->assertEquals('john, test', $result['developer']['name']); - } - - public function testExplore(){ $in = 'test'; $this->settings->expects($this->at(0)) |