use Slim\Http\Request;
use Slim\Http\Response;
-class PutLinkTest extends \PHPUnit\Framework\TestCase
+class PutLinkTest extends \Shaarli\TestCase
{
/**
* @var string datastore to test write operations
/**
* Test link update on 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' => 'PUT',
]);