Drop PHP 5.5 compatibility and upgrade PHPUnit to v5.x

PHPUnit 4.x contains deprecated PHP functions in PHP 7.2.
This commit is contained in:
ArthurHoaro 2017-10-22 13:43:19 +02:00
parent 402f58e0ba
commit 5617dcf9d2
4 changed files with 377 additions and 166 deletions
tests/api/controllers

View file

@ -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');