/** * @param string $skeleton * * @throws IOException */ private function writeSkeletonFile($skeleton) { $destination = $this->config->getDestination(); if (file_exists($destination) && !$this->config->allowOverwrite()) { throw new IOException('A PHIVE configuration file already exists. Use the "-force" switch to overwrite it.'); } file_put_contents($this->config->getDestination(), $skeleton); }
public function testGetDestination() { $config = new SkelCommandConfig($this->cliOptionsProphecy->reveal(), '/tmp/'); $this->assertEquals('/tmp/phive.xml', $config->getDestination()); }