/**
* Before each test, instantiate a new Api with its config, plugins and bookmarks.
*/
- public function setUp()
+ protected function setUp(): void
{
$this->conf = new ConfigManager('tests/utils/config/configJson');
$this->conf->set('resource.datastore', self::$testDatastore);
/**
* After each test, remove the test datastore.
*/
- public function tearDown()
+ protected function tearDown(): void
{
@unlink(self::$testDatastore);
@unlink(self::$testHistory);
/**
* Test DELETE tag endpoint: reach not existing tag.
- *
- * @expectedException Shaarli\Api\Exceptions\ApiTagNotFoundException
- * @expectedExceptionMessage Tag not found
*/
public function testDeleteLink404()
{
+ $this->expectException(\Shaarli\Api\Exceptions\ApiTagNotFoundException::class);
+ $this->expectExceptionMessage('Tag not found');
+
$tagName = 'nopenope';
$tags = $this->bookmarkService->bookmarksCountPerTag();
$this->assertFalse(isset($tags[$tagName]));