use Slim\Http\Request;
use Slim\Http\Response;
-class DeleteLinkTest extends \PHPUnit\Framework\TestCase
+class DeleteLinkTest extends \Shaarli\TestCase
{
/**
* @var string datastore to test write operations
/**
* 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 link endpoint: reach not existing ID.
- *
- * @expectedException \Shaarli\Api\Exceptions\ApiLinkNotFoundException
*/
public function testDeleteLink404()
{
+ $this->expectException(\Shaarli\Api\Exceptions\ApiLinkNotFoundException::class);
+
$id = -1;
$this->assertFalse($this->bookmarkService->exists($id));
$env = Environment::mock([