*
* @package Shaarli\Api\Controllers
*/
-class GetLinkIdTest extends \PHPUnit\Framework\TestCase
+class GetLinkIdTest extends \Shaarli\TestCase
{
/**
* @var string datastore to test write operations
/**
* Test basic getLink service: get non existent link => ApiLinkNotFoundException.
- *
- * @expectedException Shaarli\Api\Exceptions\ApiLinkNotFoundException
- * @expectedExceptionMessage Link not found
*/
public function testGetLink404()
{
+ $this->expectException(\Shaarli\Api\Exceptions\ApiLinkNotFoundException::class);
+ $this->expectExceptionMessage('Link not found');
+
$env = Environment::mock([
'REQUEST_METHOD' => 'GET',
]);