$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
*/
$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.
*/
$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
*/
$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
*/