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:
parent
402f58e0ba
commit
5617dcf9d2
4 changed files with 377 additions and 166 deletions
tests/api/controllers
|
@ -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');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue