示例#1
0
 /**
  * Delete action can not be accessed (Permission denied)
  *
  * @throws \Exception
  */
 public function testDeleteActionNoPermission()
 {
     $comment = $this->createComment('Comment for deleting');
     $this->setupUser();
     $this->setExpectedException('Exception');
     $this->commentService->delete($comment->getId());
 }
示例#2
0
 /**
  * Delete action can not be accessed  (Permission denied)
  *
  * @throws \Exception
  */
 public function testDeleteActionNoPermission()
 {
     $entity = $this->createEntityType($this->entityData);
     $this->setupUser();
     $this->setExpectedException('Exception');
     $this->commentService->delete($entity->getId());
     $this->assertResponseStatusCode(403);
 }