public function testCreateAction() { $this->dtoFactory->shouldReceive('makeDto')->with($this->request)->once()->andReturn($this->commentDto); $this->validationHandler->shouldReceive('validate')->with($this->commentDto)->once(); $this->createHandler->shouldReceive('create')->with($this->commentDto)->once()->andReturn($this->createdCommentDto); $this->responseFactory->shouldReceive('makeResponse')->once(); $this->createController->createAction($this->request); }
public function testRemoveAction() { $this->deleteHandler->shouldReceive('delete')->with(self::COMMENT_ID)->once(); $this->responseFactory->shouldReceive('makeResponse')->once(); $this->removeController->removeAction(self::COMMENT_ID); }