summaryrefslogtreecommitdiffstats
path: root/tests/Unit/Controller/FeedControllerTest.php
diff options
context:
space:
mode:
authorSean Molenaar <sean@seanmolenaar.eu>2020-10-10 00:23:15 +0200
committerBenjamin Brahmer <info@b-brahmer.de>2020-10-10 10:26:12 +0200
commitb46c6df6322e09c05a34acca69403fd4ebd238ba (patch)
tree47182b11d97869304e97f729eacc490bc420d5df /tests/Unit/Controller/FeedControllerTest.php
parenteb382ded61f608a4bb8d52a7a71478e461ca5be7 (diff)
Fix usage of at() in unittests
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
Diffstat (limited to 'tests/Unit/Controller/FeedControllerTest.php')
-rw-r--r--tests/Unit/Controller/FeedControllerTest.php19
1 files changed, 5 insertions, 14 deletions
diff --git a/tests/Unit/Controller/FeedControllerTest.php b/tests/Unit/Controller/FeedControllerTest.php
index 7498d0ccb..f5c51b93e 100644
--- a/tests/Unit/Controller/FeedControllerTest.php
+++ b/tests/Unit/Controller/FeedControllerTest.php
@@ -142,22 +142,13 @@ class FeedControllerTest extends TestCase
private function activeInitMocks($id, $type)
{
- $this->settings->expects($this->at(0))
+ $this->settings->expects($this->exactly(2))
->method('getUserValue')
- ->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($this->user),
- $this->equalTo($this->appName),
- $this->equalTo('lastViewedFeedType')
+ ->withConsecutive(
+ [$this->user, $this->appName, 'lastViewedFeedId'],
+ [$this->user, $this->appName, 'lastViewedFeedType']
)
- ->will($this->returnValue($type));
+ ->willReturnOnConsecutiveCalls($id, $type);
}