summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMarco Nassabain <marco.nassabain@hotmail.com>2021-03-03 23:15:50 +0100
committerSean Molenaar <SMillerDev@users.noreply.github.com>2021-04-08 22:31:21 +0200
commit54a228eca5965b58a75b198e04047f905162b26d (patch)
treed82821887a144aa259d5596653f48a2d0a382202 /tests
parent26569fd4a2dd2ae59236d6af1e0f02491c2a8246 (diff)
✨ Add FeedService DI into ItemService in tests
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/Unit/Service/ItemServiceTest.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/Unit/Service/ItemServiceTest.php b/tests/Unit/Service/ItemServiceTest.php
index 1985bdc18..1f77a92e2 100644
--- a/tests/Unit/Service/ItemServiceTest.php
+++ b/tests/Unit/Service/ItemServiceTest.php
@@ -18,6 +18,7 @@ use OCA\News\Service\Exceptions\ServiceConflictException;
use OCA\News\Service\Exceptions\ServiceValidationException;
use OCA\News\Service\Exceptions\ServiceNotFoundException;
use OCA\News\Service\ItemServiceV2;
+use OCA\News\Service\FeedServiceV2;
use \OCP\AppFramework\Db\DoesNotExistException;
use \OCA\News\Db\Item;
@@ -41,6 +42,12 @@ class ItemServiceTest extends TestCase
* @var MockObject|ItemMapperV2
*/
private $mapper;
+
+ /**
+ * @var MockObject|FeedServiceV2
+ */
+ private $feedService;
+
/**
* @var ItemServiceV2
*/
@@ -70,6 +77,11 @@ class ItemServiceTest extends TestCase
$this->mapper = $this->getMockBuilder(ItemMapperV2::class)
->disableOriginalConstructor()
->getMock();
+
+ $this->feedService = $this->getMockBuilder(FeedServiceV2::class)
+ ->disableOriginalConstructor()
+ ->getMock();
+
$this->config = $this->getMockBuilder(IConfig::class)
->disableOriginalConstructor()
->getMock();
@@ -80,6 +92,7 @@ class ItemServiceTest extends TestCase
$this->class = new ItemServiceV2(
$this->mapper,
+ $this->feedService,
$this->config,
$this->logger
);