Commit c020cec4 authored by Pascal Luna's avatar Pascal Luna

Correctly handle the ControllerResolverInterface::getArguments deprecation in tests

parent 74d9869d
......@@ -15,6 +15,7 @@ use PHPUnit\Framework\TestCase;
use Silex\ControllerResolver;
use Silex\Application;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Kernel;
/**
* ControllerResolver test cases.
......@@ -28,6 +29,10 @@ class ControllerResolverTest extends TestCase
*/
public function testGetArguments()
{
if (Kernel::VERSION_ID >= 30100) {
self::markTestSkipped('HttpKernel < 3.1.0 is required');
}
$app = new Application();
$resolver = new ControllerResolver($app);
......
......@@ -15,6 +15,7 @@ use PHPUnit\Framework\TestCase;
use Silex\ServiceControllerResolver;
use Silex\Application;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Kernel;
/**
* Unit tests for ServiceControllerResolver, see ServiceControllerResolverRouterTest for some
......@@ -77,8 +78,15 @@ class ServiceControllerResolverTest extends Testcase
$this->assertEquals(123, $this->resolver->getController($req));
}
/**
* @group legacy
*/
public function testShouldDelegateGetArguments()
{
if (Kernel::VERSION_ID >= 40000) {
self::markTestSkipped('HttpKernel < 4.0 is required');
}
$req = Request::create('/');
$this->mockResolver->expects($this->once())
->method('getArguments')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment