aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/api/controllers
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2017-10-22 13:43:19 +0200
committerArthurHoaro <arthur@hoa.ro>2018-02-02 19:15:47 +0100
commit5617dcf9d2b378385315161f37da5a85c700c905 (patch)
treee363a3f3f7c4a7c74dc47f17fc1fb322bff903ac /tests/api/controllers
parent402f58e0ba3d7a066ce0a5c0693dc57bc89f2b39 (diff)
downloadShaarli-5617dcf9d2b378385315161f37da5a85c700c905.tar.gz
Shaarli-5617dcf9d2b378385315161f37da5a85c700c905.tar.zst
Shaarli-5617dcf9d2b378385315161f37da5a85c700c905.zip
Drop PHP 5.5 compatibility and upgrade PHPUnit to v5.x
PHPUnit 4.x contains deprecated PHP functions in PHP 7.2.
Diffstat (limited to 'tests/api/controllers')
-rw-r--r--tests/api/controllers/PostLinkTest.php6
1 files changed, 4 insertions, 2 deletions
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 @@
3namespace Shaarli\Api\Controllers; 3namespace Shaarli\Api\Controllers;
4 4
5 5
6use PHPUnit\Framework\TestCase;
6use Shaarli\Config\ConfigManager; 7use Shaarli\Config\ConfigManager;
7use Slim\Container; 8use Slim\Container;
8use Slim\Http\Environment; 9use Slim\Http\Environment;
9use Slim\Http\Request; 10use Slim\Http\Request;
10use Slim\Http\Response; 11use Slim\Http\Response;
12use Slim\Router;
11 13
12/** 14/**
13 * Class PostLinkTest 15 * Class PostLinkTest
@@ -16,7 +18,7 @@ use Slim\Http\Response;
16 * 18 *
17 * @package Shaarli\Api\Controllers 19 * @package Shaarli\Api\Controllers
18 */ 20 */
19class PostLinkTest extends \PHPUnit_Framework_TestCase 21class PostLinkTest extends TestCase
20{ 22{
21 /** 23 /**
22 * @var string datastore to test write operations 24 * @var string datastore to test write operations
@@ -78,7 +80,7 @@ class PostLinkTest extends \PHPUnit_Framework_TestCase
78 80
79 $this->controller = new Links($this->container); 81 $this->controller = new Links($this->container);
80 82
81 $mock = $this->getMock('\Slim\Router', ['relativePathFor']); 83 $mock = $this->createMock(Router::class);
82 $mock->expects($this->any()) 84 $mock->expects($this->any())
83 ->method('relativePathFor') 85 ->method('relativePathFor')
84 ->willReturn('api/v1/links/1'); 86 ->willReturn('api/v1/links/1');