summaryrefslogtreecommitdiffstats
path: root/tests/unit/controller/FeedControllerTest.php
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-04-20 12:14:42 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-04-20 12:14:42 +0200
commitb9f3136f3a7564b983aef6564f9c7488d5b2b25b (patch)
treea50cc5851cf399df4ba594eacac53f3533c6a2ea /tests/unit/controller/FeedControllerTest.php
parente56498784f6691d5ceba84ed070f5b6f0d27aafa (diff)
get rid of unneeded settings core class and inject it from the core container
Diffstat (limited to 'tests/unit/controller/FeedControllerTest.php')
-rw-r--r--tests/unit/controller/FeedControllerTest.php18
1 files changed, 11 insertions, 7 deletions
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));
}