X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2Fapi%2Fcontrollers%2FPostLinkTest.php;h=100a91704f866e383430cf2e690522302ba20957;hb=5617dcf9d2b378385315161f37da5a85c700c905;hp=31954e396d2d95b56b24bb08f7fe1876ce83ed21;hpb=402f58e0ba3d7a066ce0a5c0693dc57bc89f2b39;p=github%2Fshaarli%2FShaarli.git diff --git a/tests/api/controllers/PostLinkTest.php b/tests/api/controllers/PostLinkTest.php index 31954e39..100a9170 100644 --- a/tests/api/controllers/PostLinkTest.php +++ b/tests/api/controllers/PostLinkTest.php @@ -3,11 +3,13 @@ namespace Shaarli\Api\Controllers; +use PHPUnit\Framework\TestCase; use Shaarli\Config\ConfigManager; use Slim\Container; use Slim\Http\Environment; use Slim\Http\Request; use Slim\Http\Response; +use Slim\Router; /** * Class PostLinkTest @@ -16,7 +18,7 @@ use Slim\Http\Response; * * @package Shaarli\Api\Controllers */ -class PostLinkTest extends \PHPUnit_Framework_TestCase +class PostLinkTest extends TestCase { /** * @var string datastore to test write operations @@ -78,7 +80,7 @@ class PostLinkTest extends \PHPUnit_Framework_TestCase $this->controller = new Links($this->container); - $mock = $this->getMock('\Slim\Router', ['relativePathFor']); + $mock = $this->createMock(Router::class); $mock->expects($this->any()) ->method('relativePathFor') ->willReturn('api/v1/links/1');