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
*
* @package Shaarli\Api\Controllers
*/
-class PostLinkTest extends \PHPUnit_Framework_TestCase
+class PostLinkTest extends TestCase
{
/**
* @var string datastore to test write operations
$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');