コード例 #1
0
ファイル: SkelCommand.php プロジェクト: paul-schulleri/phive
 /**
  *
  */
 public function execute()
 {
     $skeleton = file_get_contents($this->config->getTemplateFilename());
     $skeleton = $this->replacePlaceholder($skeleton, '%%VERSION%%', $this->version->getVersion());
     $skeleton = $this->replacePlaceholder($skeleton, '%%DATE%%', $this->now->format('Y-m-d H:i:sO'));
     $this->writeSkeletonFile($skeleton);
 }
コード例 #2
0
 public function testGetTemplateFilename()
 {
     $config = new SkelCommandConfig($this->cliOptionsProphecy->reveal(), '/tmp/');
     $expected = realpath(__DIR__ . '/../../../../conf/phive.skeleton.xml');
     $actual = realpath($config->getTemplateFilename());
     $this->assertEquals($expected, $actual);
 }