private function prepareEvent(ProcessEvent $event, $commandName, array $errors = []) { $this->command->expects($this->once())->method('getName')->will($this->returnValue($commandName)); $description = $this->getMock('GuzzleHttp\\Command\\Guzzle\\DescriptionInterface'); $operation = new Operation(['errorResponses' => $errors], $description); $description->expects($this->once())->method('getOperation')->with($commandName)->will($this->returnValue($operation)); $this->serviceClient->expects($this->once())->method('getDescription')->will($this->returnValue($description)); }