public function testShouldCleanPreviousResults() { $fn = self::getFilePath('previous.xml'); touch($fn); $this->assertFileExists($fn, 'Fixture file was not created'); // check preconditions $this->publisher->setFileName(basename($fn)); $this->publisher->clean(); $this->assertFileNotExists($fn); }
/** * @codeCoverageIgnore * @param InputInterface $input * @param OutputInterface $output * @return ProcessSetCreator */ protected function getProcessSetCreator(InputInterface $input, OutputInterface $output) { if (!$this->processSetCreator) { $xmlPublisher = new XmlPublisher($input->getArgument(self::ARGUMENT_ENVIRONMENT), null, null); $xmlPublisher->setFileDir($input->getOption(self::OPTION_LOGS_DIR)); $xmlPublisher->clean(); $this->processSetCreator = new ProcessSetCreator($this, $input, $output, $xmlPublisher); } return $this->processSetCreator; }