/** * Runs through the files int the API src dir, and pulls the public methods out * * @param InputInterface $input * @param OutputInterface $output * * @return int|null|void */ public function execute(InputInterface $input, OutputInterface $output) { $this->setInputOutput($input, $output); $this->output->writeln("<info>Formatting generated code...</info>"); $this->generator->setAndMakeApiDirectory($this->input->getOption('directory'), false, $this->output); $script = $this->generator->vendorDirectory($this->relative_fmt_path); $commands = $this->getFormatterOptions(); $files = $this->determineFiles(); $response = $this->request->setCommand(implode(" ", [$script, $commands, $files]))->run(500, 500); $this->outputResponse($response); }
/** * The generator hard codes the full wsdl into the code, so this removes it */ private function removeHostName() { $this->output->writeln("<info>Removing hardcoded hostname...</info>"); $command = 'sed -i "" "s|' . preg_quote($this->generator->hostPath()) . '||g" ' . $this->generator->generatedDirectory('*.php', false); $response = $this->request->setCommand($command)->run(); $this->outputResponse($response); }
private function setUpRequest() { $this->generator_mock->shouldReceive('add')->withAnyArgs()->once(); $this->generator_mock->shouldReceive('get')->with('Symfony\\Component\\Process\\Process')->andReturn($this->process_mock)->once(); $this->request = $this->request->setCommand('some_command'); }