Ejemplo n.º 1
0
 public function setUp()
 {
     $this->argumentManager = $this->prophesize(Manager::class);
     $this->argumentManager->add(Argument::type('array'))->shouldBeCalled();
     $this->argumentManager->parse(Argument::type('array'))->shouldBeCalled();
     $this->climate = $this->prophesize(CLImate::class);
     $this->climate->arguments = $this->argumentManager->reveal();
     $this->climate->out(Argument::containingString('PHPAssumptions analyser'))->shouldBeCalled()->willReturn($this->climate);
     $this->climate->br()->shouldBeCalled();
     $this->cli = new Cli($this->climate->reveal());
 }
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');
     }
 }