/** * 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()); }
/** * 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); }