mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-28 01:25:00 +00:00
Tickets: edit comments and mark them as deleted
This commit is contained in:
@@ -15,6 +15,7 @@ use Chill\TicketBundle\Action\Ticket\Handler\AddCommentCommandHandler;
|
||||
use Chill\TicketBundle\Controller\AddCommentController;
|
||||
use Chill\TicketBundle\Entity\Comment;
|
||||
use Chill\TicketBundle\Entity\Ticket;
|
||||
use Chill\TicketBundle\Security\Voter\CommentVoter;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Prophecy\Argument;
|
||||
use Prophecy\PhpUnit\ProphecyTrait;
|
||||
@@ -87,6 +88,7 @@ class AddCommentControllerTest extends KernelTestCase
|
||||
$entityManager = $this->prophesize(EntityManagerInterface::class);
|
||||
|
||||
if ($willFlush) {
|
||||
$security->isGranted(CommentVoter::CREATE, Argument::type(Comment::class))->willReturn(true);
|
||||
$entityManager->persist(Argument::type(Comment::class))->shouldBeCalled();
|
||||
$entityManager->flush()->shouldBeCalled();
|
||||
}
|
||||
|
Reference in New Issue
Block a user