protected function setUpMocks()
 {
     $this->input_mock = TestFactory::mockInputArray();
     $this->output_mock = TestFactory::mockOutputConsole();
     $this->request_mock = TestFactory::mockRequest();
     $this->response_mock = TestFactory::mockResponse();
 }
 /**
  * @test
  */
 public function it_makes_the_api_directory_and_writes_to_output_if_second_parameter_is_passed()
 {
     $path = __DIR__ . DIRECTORY_SEPARATOR . 'Stubs' . DIRECTORY_SEPARATOR . 'Api';
     $this->files_mock->shouldReceive('isDirectory')->with($path)->andReturn(false)->once();
     $this->files_mock->shouldReceive('makeDirectory')->with($path)->andReturn(false)->once();
     $this->files_mock->shouldReceive('deleteDirectory')->with($path, true)->never();
     $path .= DIRECTORY_SEPARATOR . 'Generated';
     $this->files_mock->shouldReceive('isDirectory')->with($path)->andReturn(false)->once();
     $this->files_mock->shouldReceive('makeDirectory')->with($path)->andReturn(false)->once();
     $output_mock = TestFactory::mockOutputConsole();
     $output_mock->shouldReceive('writeln')->withAnyArgs()->andReturnNull()->times(4);
     $this->assertEquals($this->generator, $this->generator->makeApiDirectory(false, $output_mock));
 }
 /**
  * Mocks that are needed for all of the command tests
  */
 private function setupMocks()
 {
     $this->generator_mock = TestFactory::mockGenerator();
     $this->input_mock = TestFactory::mockInputArray();
     $this->output_mock = TestFactory::mockOutputConsole();
 }