From 5617dcf9d2b378385315161f37da5a85c700c905 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Sun, 22 Oct 2017 13:43:19 +0200 Subject: Drop PHP 5.5 compatibility and upgrade PHPUnit to v5.x PHPUnit 4.x contains deprecated PHP functions in PHP 7.2. --- tests/api/controllers/PostLinkTest.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tests/api/controllers/PostLinkTest.php') 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'); -- cgit v1.2.3