X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2Fapi%2Fcontrollers%2Flinks%2FGetLinkIdTest.php;h=99dc606fbf95c1d6bae7ef716a4fa335a55491e4;hb=a5a9cf23acd1248585173aa32757d9720b5f2d62;hp=ee42e259a362491e3f29b17297359bb3fa541a82;hpb=8f60e1206e45e67c96a7630d4ff94e72fe875f09;p=github%2Fshaarli%2FShaarli.git diff --git a/tests/api/controllers/links/GetLinkIdTest.php b/tests/api/controllers/links/GetLinkIdTest.php index ee42e259..99dc606f 100644 --- a/tests/api/controllers/links/GetLinkIdTest.php +++ b/tests/api/controllers/links/GetLinkIdTest.php @@ -20,7 +20,7 @@ use Slim\Http\Response; * * @package Shaarli\Api\Controllers */ -class GetLinkIdTest extends \PHPUnit\Framework\TestCase +class GetLinkIdTest extends \Shaarli\TestCase { /** * @var string datastore to test write operations @@ -120,12 +120,12 @@ class GetLinkIdTest extends \PHPUnit\Framework\TestCase /** * 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', ]);