diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-11-17 16:18:43 +0100 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-11-17 16:18:43 +0100 |
commit | f4f27ce5c38e1069cad1ccf00b0f1ba0b06ea6c4 (patch) | |
tree | 338e620fd59c623c44a219ce20e9a2b2b0d7d21c /tests/unit | |
parent | 8d54a68f27a50a5c0f5ac0cb3a193be9671d812b (diff) |
get rid of appconfig
Diffstat (limited to 'tests/unit')
-rw-r--r-- | tests/unit/controller/PageControllerTest.php | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/tests/unit/controller/PageControllerTest.php b/tests/unit/controller/PageControllerTest.php index 03d3889d3..477be7ead 100644 --- a/tests/unit/controller/PageControllerTest.php +++ b/tests/unit/controller/PageControllerTest.php @@ -26,7 +26,6 @@ class PageControllerTest extends \PHPUnit_Framework_TestCase { private $appConfig; private $configData; private $config; - private $adminConfig; /** * Gets run before each test @@ -60,10 +59,6 @@ class PageControllerTest extends \PHPUnit_Framework_TestCase { '\OCP\IURLGenerator') ->disableOriginalConstructor() ->getMock(); - $this->adminConfig = $this->getMockBuilder( - '\OCP\IAppConfig') - ->disableOriginalConstructor() - ->getMock(); $this->appConfig = $this->getMockBuilder( '\OCA\News\Config\AppConfig') ->disableOriginalConstructor() @@ -74,7 +69,7 @@ class PageControllerTest extends \PHPUnit_Framework_TestCase { ->getMock(); $this->controller = new PageController($this->appName, $this->request, $this->settings, $this->urlGenerator, $this->appConfig, - $this->adminConfig, $this->config, $this->l10n, $this->user); + $this->config, $this->l10n, $this->user); } @@ -83,8 +78,8 @@ class PageControllerTest extends \PHPUnit_Framework_TestCase { ->method('getUseCronUpdates') ->will($this->returnValue(true)); - $this->adminConfig->expects($this->once()) - ->method('getValue') + $this->settings->expects($this->once()) + ->method('getAppValue') ->with( $this->equalTo('core'), $this->equalTo('backgroundjobs_mode') @@ -102,8 +97,8 @@ class PageControllerTest extends \PHPUnit_Framework_TestCase { ->method('getUseCronUpdates') ->will($this->returnValue(true)); - $this->adminConfig->expects($this->once()) - ->method('getValue') + $this->settings->expects($this->once()) + ->method('getAppValue') ->with( $this->equalTo('core'), $this->equalTo('backgroundjobs_mode') @@ -120,8 +115,8 @@ class PageControllerTest extends \PHPUnit_Framework_TestCase { ->method('getUseCronUpdates') ->will($this->returnValue(false)); - $this->adminConfig->expects($this->once()) - ->method('getValue') + $this->settings->expects($this->once()) + ->method('getAppValue') ->with( $this->equalTo('core'), $this->equalTo('backgroundjobs_mode') |