Exemple #1
0
 public function testDoubleBoot()
 {
     $cubex = new Cubex(__DIR__);
     $cubex->boot();
     $sm = $cubex->make('service.manager');
     $cubex->boot();
     $this->assertSame($sm, $cubex->make('service.manager'));
 }
Exemple #2
0
 public function getCommandOutput(ConsoleCommand $command, $options)
 {
     $console = new Console();
     $cubex = new Cubex();
     $cubex->boot();
     $console->setCubex($cubex);
     $command->setApplication($console);
     $input = new ArrayInput(array_merge(['command' => $command->getName()], $options));
     $output = new BufferedOutput();
     $command->run($input, $output);
     return $output->fetch();
 }