Ejemplo n.º 1
0
 /**
  * @test
  */
 public function itShouldShowUsageWithNoArgs()
 {
     $this->argumentManager->parse(Argument::type('array'))->willThrow(\Exception::class);
     $args = ['phpa'];
     $this->climate->usage($args)->shouldBeCalled();
     $this->cli->handle($args);
 }
Ejemplo n.º 2
0
 protected function bootstrapApp(array $argv)
 {
     $args = new Manager();
     $args->add('shoelace', ['prefix' => 's', 'longPrefix' => 'shoelace']);
     $args->parse($argv);
     if ($args->defined('shoelace')) {
         $bootstrap = $args->get('shoelace');
         $files = explode(',', $bootstrap);
         foreach ($files as $file) {
             require_once $file;
         }
     }
     if (!defined('COBBLER_OUTPUT')) {
         define('COBBLER_OUTPUT', __DIR__ . '/../../output');
     }
     if (!defined('COBBLER_CONFIG')) {
         define('COBBLER_CONFIG', __DIR__ . '/../../config');
     }
     if (!defined('TWBS_PATH')) {
         define('TWBS_PATH', __DIR__ . '/../../../../twbs/bootstrap');
     }
 }