public function isGranted($attributes, $object = null) { return parent::isGranted($attributes, $object); }
public function testIsGranted() { $authorizationChecker = $this->getMock('Symfony\\Component\\Security\\Core\\Authorization\\AuthorizationCheckerInterface'); $authorizationChecker->expects($this->once())->method('isGranted')->willReturn(true); $container = $this->getMock('Symfony\\Component\\DependencyInjection\\ContainerInterface'); $container->expects($this->at(0))->method('has')->will($this->returnValue(true)); $container->expects($this->at(1))->method('get')->will($this->returnValue($authorizationChecker)); $controller = new TestController(); $controller->setContainer($container); $this->assertTrue($controller->isGranted('foo')); }