use Symfony\Component\HttpKernel\Event\ControllerEvent;
use Symfony\Component\HttpKernel\HttpKernelInterface;
use Symfony\Component\HttpKernel\Tests\Fixtures\Attribute\Bar;
use Symfony\Component\HttpKernel\Tests\Fixtures\Attribute\Baz;
use Symfony\Component\HttpKernel\Tests\Fixtures\Controller\AttributeController;
use Symfony\Component\HttpKernel\Tests\TestHttpKernel;
class ControllerArgumentsEventTest extends TestCase
{ public function testControllerArgumentsEvent() { $event =
new ControllerArgumentsEvent(new TestHttpKernel(),
function D
) {},
['test'
],
new Request(), HttpKernelInterface::MAIN_REQUEST
);
$this->
assertEquals($event->
getArguments(),
['test'
]);
} public function testSetAttributes() { $controller =
function D
) {};
$event =
new ControllerArgumentsEvent(new TestHttpKernel(),
$controller,
['test'
],
new Request(), HttpKernelInterface::MAIN_REQUEST
);
$event->
setController($controller,
[]);
$this->
assertSame([],
$event->
getAttributes());
}