/** * Execute the command. * * @return void */ public function fire() { $this->config->set('enabled', false); $fetcher = new Fetcher(); $converter = new Converter(base_path() . '/vendor/pragmarx/ua-parser/php/resources/'); $converter->convertString($fetcher->fetch(), false); }
public function testFileIsNotBackedUp() { $this->fs->expects($this->once())->method('exists')->with($this->yamlFile)->will($this->returnValue(true)); $this->fs->expects($this->never())->method('copy'); $this->fs->expects($this->once())->method('dumpFile')->with($this->phpFile, $this->php); $this->converter->convertFile($this->yamlFile, false); }
protected function execute(InputInterface $input, OutputInterface $output) { $fetcher = new Fetcher(); $converter = new Converter($this->resourceDirectory); $converter->convertString($fetcher->fetch(), !$input->getOption('no-backup')); }