From 54a228eca5965b58a75b198e04047f905162b26d Mon Sep 17 00:00:00 2001 From: Marco Nassabain Date: Wed, 3 Mar 2021 23:15:50 +0100 Subject: =?UTF-8?q?=E2=9C=A8=20Add=20FeedService=20DI=20into=20ItemService?= =?UTF-8?q?=20in=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marco Nassabain --- tests/Unit/Service/ItemServiceTest.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tests') 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 ); -- cgit v1.2.3