Ejemplo n.º 1
0
 /**
  * @dataProvider onFindAfterProvider
  */
 public function testOnFindAfter($isGranted, $throwException)
 {
     $this->listener->setRequest($this->request);
     $object = new \stdClass();
     $this->securityFacade->expects($this->once())->method('isRequestObjectIsGranted')->with($this->request, $object)->will($this->returnValue($isGranted));
     if ($throwException) {
         $this->setExpectedException('Symfony\\Component\\Security\\Core\\Exception\\AccessDeniedException');
     }
     $event = new FindAfter($object);
     $this->listener->onFindAfter($event);
 }