summaryrefslogtreecommitdiffstats
path: root/tests/Unit/Controller/FeedControllerTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Unit/Controller/FeedControllerTest.php')
-rw-r--r--tests/Unit/Controller/FeedControllerTest.php21
1 files changed, 19 insertions, 2 deletions
diff --git a/tests/Unit/Controller/FeedControllerTest.php b/tests/Unit/Controller/FeedControllerTest.php
index 487ef0af1..871b781e0 100644
--- a/tests/Unit/Controller/FeedControllerTest.php
+++ b/tests/Unit/Controller/FeedControllerTest.php
@@ -187,8 +187,13 @@ class FeedControllerTest extends TestCase
}
-
- private function activeInitMocks($id, $type)
+ /**
+ * Configure settings with active mocks
+ *
+ * @param $id
+ * @param $type
+ */
+ private function activeInitMocks($id, $type): void
{
$this->settings->expects($this->exactly(2))
->method('getUserValue')
@@ -313,6 +318,10 @@ class FeedControllerTest extends TestCase
$this->feedService->expects($this->once())
->method('purgeDeleted')
->with($this->uid, false);
+
+ $this->feedService->expects($this->once())
+ ->method('fetch')
+ ->with($result['feeds'][0]);
$this->feedService->expects($this->once())
->method('create')
->with($this->uid, 'hi', 4, false, 'yo')
@@ -337,6 +346,10 @@ class FeedControllerTest extends TestCase
$this->feedService->expects($this->once())
->method('purgeDeleted')
->with($this->uid, false);
+
+ $this->feedService->expects($this->once())
+ ->method('fetch')
+ ->with($result['feeds'][0]);
$this->feedService->expects($this->once())
->method('create')
->with($this->uid, 'hi', null, false, 'yo')
@@ -365,6 +378,10 @@ class FeedControllerTest extends TestCase
->with($this->uid, 'hi', 4, false, 'yo')
->will($this->returnValue($result['feeds'][0]));
+ $this->feedService->expects($this->once())
+ ->method('fetch')
+ ->with($result['feeds'][0]);
+
$response = $this->class->create('hi', 4, 'yo');
$this->assertEquals($result, $response);