]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - tests/bookmark/BookmarkFileServiceTest.php
Add strict types for bookmarks management
[github/shaarli/Shaarli.git] / tests / bookmark / BookmarkFileServiceTest.php
index 6c56dfaabbcb84655e82d75342f1b031332cd52c..59c0608c5a7c701db3a363733d7492563df27718 100644 (file)
@@ -264,17 +264,6 @@ class BookmarkFileServiceTest extends TestCase
         $this->publicLinkDB->add(new Bookmark());
     }
 
-    /**
-     * Test add() method with an entry which is not a bookmark instance
-     */
-    public function testAddNotABookmark()
-    {
-        $this->expectException(\Exception::class);
-        $this->expectExceptionMessage('Provided data is invalid');
-
-        $this->privateLinkDB->add(['title' => 'hi!']);
-    }
-
     /**
      * Test add() method with a Bookmark already containing an ID
      */
@@ -412,17 +401,6 @@ class BookmarkFileServiceTest extends TestCase
         $this->publicLinkDB->set(new Bookmark());
     }
 
-    /**
-     * Test set() method with an entry which is not a bookmark instance
-     */
-    public function testSetNotABookmark()
-    {
-        $this->expectException(\Exception::class);
-        $this->expectExceptionMessage('Provided data is invalid');
-
-        $this->privateLinkDB->set(['title' => 'hi!']);
-    }
-
     /**
      * Test set() method with a Bookmark without an ID defined.
      */
@@ -496,17 +474,6 @@ class BookmarkFileServiceTest extends TestCase
         $this->publicLinkDB->addOrSet(new Bookmark());
     }
 
-    /**
-     * Test addOrSet() method with an entry which is not a bookmark instance
-     */
-    public function testAddOrSetNotABookmark()
-    {
-        $this->expectException(\Exception::class);
-        $this->expectExceptionMessage('Provided data is invalid');
-
-        $this->privateLinkDB->addOrSet(['title' => 'hi!']);
-    }
-
     /**
      * Test addOrSet() method for a bookmark without any field set and without writing the data store
      */
@@ -564,17 +531,6 @@ class BookmarkFileServiceTest extends TestCase
         $this->publicLinkDB->remove($bookmark);
     }
 
-    /**
-     * Test remove() method with an entry which is not a bookmark instance
-     */
-    public function testRemoveNotABookmark()
-    {
-        $this->expectException(\Exception::class);
-        $this->expectExceptionMessage('Provided data is invalid');
-
-        $this->privateLinkDB->remove(['title' => 'hi!']);
-    }
-
     /**
      * Test remove() method with a Bookmark with an unknown ID
      */