X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2Fapi%2Fcontrollers%2Flinks%2FPutLinkTest.php;h=3d62a1b143c35447fc217d7eb697f7d0b6fe1ebd;hb=b1baca99f280570d0336b4d71ad1f9dca213a35b;hp=f582a2b536dac3fdf76c9894e4ed7d54b896d3d2;hpb=8f60e1206e45e67c96a7630d4ff94e72fe875f09;p=github%2Fshaarli%2FShaarli.git diff --git a/tests/api/controllers/links/PutLinkTest.php b/tests/api/controllers/links/PutLinkTest.php index f582a2b5..3d62a1b1 100644 --- a/tests/api/controllers/links/PutLinkTest.php +++ b/tests/api/controllers/links/PutLinkTest.php @@ -218,12 +218,12 @@ class PutLinkTest extends \PHPUnit\Framework\TestCase /** * 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', ]);