diff options
author | Marco Nassabain <marco.nassabain@hotmail.com> | 2021-03-04 23:28:25 +0100 |
---|---|---|
committer | Sean Molenaar <SMillerDev@users.noreply.github.com> | 2021-04-08 22:31:21 +0200 |
commit | 5c5578b16ec53701fbe7a5b5d669dce04bcf9393 (patch) | |
tree | dcb9cb4838b7ca8b2532a225bbc189891dcbd271 /tests/Unit | |
parent | e6eb878c4fbd7e798b17e881f6f1fc9e0267c41e (diff) |
✅ Update ItemServiceTest: remove share tests
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
Diffstat (limited to 'tests/Unit')
-rw-r--r-- | tests/Unit/Service/ItemServiceTest.php | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/tests/Unit/Service/ItemServiceTest.php b/tests/Unit/Service/ItemServiceTest.php index e67756468..b1cbe6d8d 100644 --- a/tests/Unit/Service/ItemServiceTest.php +++ b/tests/Unit/Service/ItemServiceTest.php @@ -631,60 +631,4 @@ class ItemServiceTest extends TestCase $this->class->purgeOverThreshold(5); } - - public function testShare() - { - $itemId = 3; - - $item = new Item(); - $item->setGuid('_guid_') - ->setGuidHash(md5('_guid_')) - ->setUrl('_url_') - ->setTitle('_title_') - ->setAuthor('_author_') - ->setPubDate(1) - ->setBody('_body_') - ->setEnclosureMime('_enclosureMime_') - ->setEnclosureLink('_enclosureLink_') - ->setMediaThumbnail('_mediaThumbnail_') - ->setMediaDescription('_mediaDescription_') - ->setRtl('_rtl_') - ->setFingerprint('_fingerprint_') - ->setContentHash('_contentHash_') - ->setSearchIndex('_searchIndex_') - ->setUnread(0) - ->setStarred(1) - ->setFeedId(10); - - $sharedItem = Item::fromImport($item->jsonSerialize()); - $sharedItem->setUnread(true) - ->setStarred(false) - ->setFeedId($item->getFeedId()) - ->setFingerprint($item->getFingerprint()) - ->setContentHash($item->getContentHash()) - ->setSearchIndex($item->getSearchIndex()) - ->setSharedBy('sender') - ->setSharedWith('recipient'); - - $this->mapper->expects($this->once()) - ->method('findFromUser') - ->with('sender', $itemId) - ->will($this->returnValue($item)); - - $this->mapper->expects($this->once()) - ->method('insert') - ->with($sharedItem); - - $this->class->share('sender', $itemId, 'recipient'); - } - - public function testShareDoesNotExist() - { - $this->expectException(ServiceNotFoundException::class); - $this->mapper->expects($this->once()) - ->method('findFromUser') - ->will($this->throwException(new DoesNotExistException(''))); - - $this->class->share('sender', 1, 'recipient'); - } } |