]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - tests/api/controllers/links/GetLinkIdTest.php
Convert legacy PHPUnit @expected* to new ->expect*
[github/shaarli/Shaarli.git] / tests / api / controllers / links / GetLinkIdTest.php
index ee42e259a362491e3f29b17297359bb3fa541a82..3a3aaa7b8d8696c0ef0a4077a882e414415728d6 100644 (file)
@@ -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',
         ]);