diff options
author | ArthurHoaro <arthur@hoa.ro> | 2018-02-02 19:20:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-02 19:20:11 +0100 |
commit | 17b4baedec3902a1549451ede36f914000019797 (patch) | |
tree | 6e41c336cff937358f875d338b038cfee1eeed3a /tests/api | |
parent | 91813a363468404b7bf2937494812f1fa34a12b4 (diff) | |
parent | 28df9fa4f7d901632e7fd6e23b6d7dd345f1f6e7 (diff) | |
download | Shaarli-17b4baedec3902a1549451ede36f914000019797.tar.gz Shaarli-17b4baedec3902a1549451ede36f914000019797.tar.zst Shaarli-17b4baedec3902a1549451ede36f914000019797.zip |
Merge pull request #1003 from ArthurHoaro/ci/php7.2
Drop PHP 5.5 compatibility and run Travis UT against PHP 7.2
Diffstat (limited to 'tests/api')
-rw-r--r-- | tests/api/controllers/PostLinkTest.php | 6 |
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 @@ | |||
3 | namespace Shaarli\Api\Controllers; | 3 | namespace Shaarli\Api\Controllers; |
4 | 4 | ||
5 | 5 | ||
6 | use PHPUnit\Framework\TestCase; | ||
6 | use Shaarli\Config\ConfigManager; | 7 | use Shaarli\Config\ConfigManager; |
7 | use Slim\Container; | 8 | use Slim\Container; |
8 | use Slim\Http\Environment; | 9 | use Slim\Http\Environment; |
9 | use Slim\Http\Request; | 10 | use Slim\Http\Request; |
10 | use Slim\Http\Response; | 11 | use Slim\Http\Response; |
12 | use 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 | */ |
19 | class PostLinkTest extends \PHPUnit_Framework_TestCase | 21 | class 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'); |