From b9f3136f3a7564b983aef6564f9c7488d5b2b25b Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Sun, 20 Apr 2014 12:14:42 +0200 Subject: get rid of unneeded settings core class and inject it from the core container --- tests/unit/controller/FeedControllerTest.php | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'tests/unit/controller/FeedControllerTest.php') diff --git a/tests/unit/controller/FeedControllerTest.php b/tests/unit/controller/FeedControllerTest.php index f25d4beed..a8309b41c 100644 --- a/tests/unit/controller/FeedControllerTest.php +++ b/tests/unit/controller/FeedControllerTest.php @@ -44,7 +44,7 @@ class FeedControllerTest extends ControllerTestUtility { $this->appName = 'news'; $this->user = 'jack'; $this->settings = $this->getMockBuilder( - '\OCA\News\Core\Settings') + '\OCP\IConfig') ->disableOriginalConstructor() ->getMock(); $this->itemBusinessLayer = $this->getMockBuilder('\OCA\News\BusinessLayer\ItemBusinessLayer') @@ -61,8 +61,8 @@ class FeedControllerTest extends ControllerTestUtility { $this->folderBusinessLayer, $this->feedBusinessLayer, $this->itemBusinessLayer, - $this->user, - $this->settings); + $this->settings, + $this->user); } private function assertFeedControllerAnnotations($methodName){ @@ -82,8 +82,8 @@ class FeedControllerTest extends ControllerTestUtility { $this->folderBusinessLayer, $this->feedBusinessLayer, $this->itemBusinessLayer, - $this->user, - $this->settings); + $this->settings, + $this->user); } @@ -189,11 +189,15 @@ class FeedControllerTest extends ControllerTestUtility { private function activeInitMocks($id, $type){ $this->settings->expects($this->at(0)) ->method('getUserValue') - ->with($this->equalTo('lastViewedFeedId')) + ->with($this->equalTo($this->user), + $this->equalTo($this->appName), + $this->equalTo('lastViewedFeedId')) ->will($this->returnValue($id)); $this->settings->expects($this->at(1)) ->method('getUserValue') - ->with($this->equalTo('lastViewedFeedType')) + ->with($this->equalTo($this->user), + $this->equalTo($this->appName), + $this->equalTo('lastViewedFeedType')) ->will($this->returnValue($type)); } -- cgit v1.2.3