From f9f25ddbd2214abf5b290e881b1f1dbe57342888 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien?= Date: Tue, 16 Feb 2021 16:25:32 +0100 Subject: Add tests setSharedBy and setSharedWith Signed-off-by: Marco Nassabain --- tests/Unit/Db/ItemTest.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/Unit/Db/ItemTest.php b/tests/Unit/Db/ItemTest.php index 75880c8a7..5cd0cddac 100644 --- a/tests/Unit/Db/ItemTest.php +++ b/tests/Unit/Db/ItemTest.php @@ -453,4 +453,18 @@ class ItemTest extends TestCase $this->assertEquals(json_encode(['podcast', 'blog']), $item->getCategoriesJson()); $this->assertArrayHasKey('categoriesJson', $item->getUpdatedFields()); } + + public function testSetSharedBy(){ + $item = new Item(); + $item->setSharedBy('Hector'); + $this->assertEquals('Hector', $item->getSharedBy()); + $this->assertArrayHasKey('sharedBy', $item->getUpdatedFields()); + } + + public function testSetSharedWith(){ + $item = new Item(); + $item->setSharedWith('Hector'); + $this->assertEquals('Hector', $item->getSharedWith()); + $this->assertArrayHasKey('sharedWith', $item->getUpdatedFields()); + } } -- cgit v1.2.3