public function test_it_correctly_processes_existing_drawing_command()
 {
     $this->drawingTool->processCommand(DrawingTool::COMMAND_CREATE, [20, 5]);
     $canvas = $this->drawingTool->getCanvas();
     $commandArgs = [1, 2];
     $this->drawingCommand->shouldReceive("draw")->withArgs([$canvas, $commandArgs]);
     $this->drawingTool->processCommand(self::MOCK_DRAWING_COMMAND, $commandArgs);
 }
示例#2
0
 /**
  * @return string
  */
 public function getCanvasView()
 {
     $view = new CanvasTextView($this->drawingTool->getCanvas());
     return $view->render();
 }