Exemplo n.º 1
0
 public function testLoadConfig()
 {
     $file = __DIR__ . '/../../../src/cbednarski/Pharcc/Resources/pharcc.yml';
     $config = Config::loadFile($file);
     $this->assertEquals('bin/app', $config->getMain());
     $this->assertEquals('app.phar', $config->getName());
     $includes = array('src/', 'vendor/');
     $this->assertEquals($includes, $config->getIncludes());
     $excludes = array('/[Tt]ests?/', 'Test\\.php$', '/docs?/', '^vendor/phpunit');
     $this->assertEquals($excludes, $config->getExcludes());
 }
Exemplo n.º 2
0
Arquivo: Init.php Projeto: ovr/pharcc
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $directory = $input->getArgument('directory');
     if (!$directory) {
         $directory = getcwd();
     }
     if (Config::generate($directory)) {
         $output->writeln('<info>Initialized pharcc.yml under ' . $directory . '</info>');
     } else {
         $output->writeln('<error>Unable to write pharcc.yml to ' . $directory . '</error>');
     }
 }
Exemplo n.º 3
0
Arquivo: Build.php Projeto: ovr/pharcc
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $directory = $input->getArgument('directory');
     if (!$directory) {
         $directory = getcwd();
     }
     $config = Config::loadFile($directory . '/.pharcc.yml');
     $compiler = new Compiler($config);
     // $compiler->setOutput($output);
     $output->writeln('<info>Building ' . $config->getName() . '</info>');
     $compiler->compile();
     $output->writeln('<info>Build complete.</info>');
 }