/** * @param Request $request */ public function bindRequest(Request $request) { $this->permissionAdmin->bindRequest($request); }
/** * @covers Kunstmaan\AdminBundle\Helper\Security\Acl\Permission\PermissionAdmin::createAclChangeset */ public function testCreateAclChangeset() { $em = $this->getEntityManager(); $em->expects($this->once())->method('persist')->with($this->isInstanceOf('Kunstmaan\\AdminBundle\\Entity\\AclChangeset')); $em->expects($this->once())->method('flush'); $context = $this->getSecurityContext(); $aclProvider = $this->getAclProvider(); $retrievalStrategy = $this->getOidRetrievalStrategy(); $dispatcher = $this->getEventDispatcher(); $shell = $this->getShell(); $kernel = $this->getKernel(); $object = new PermissionAdmin($em, $context, $aclProvider, $retrievalStrategy, $dispatcher, $shell, $kernel); $entity = $this->getEntity(); /* @var $user User */ $user = $this->getMockBuilder('Kunstmaan\\AdminBundle\\Entity\\User')->disableOriginalConstructor()->getMock(); $object->createAclChangeSet($entity, array(), $user); }