Esempio n. 1
0
 /**
  * Confirm that all the core commands with bootstrap level
  * `BOOT_SUGAR_ROOT` will be available by default.
  */
 public function testDebugOutput()
 {
     $kernel = $this->getKernel(Kernel::BOOT_INSULIN, null, true);
     $insulin = new Application($kernel);
     $insulin->setAutoExit(false);
     $insulinTester = new ApplicationTester($insulin);
     $insulinTester->run(array('command' => 'list'));
     $this->assertRegExp('/Memory usage: (.*)MB \\(peak: (.*)MB\\), time: (.*)s/', $insulinTester->getDisplay());
 }
Esempio n. 2
0
 /**
  * @expectedException \Exception
  */
 public function testExecutionRequirements()
 {
     $kernel = $this->getKernel(Kernel::BOOT_INSULIN);
     $insulin = new Application($kernel);
     $insulin->setAutoExit(false);
     $insulin->add(new SugarVersionCommand());
     $command = $insulin->find('sugar:version');
     $commandTester = new CommandTester($command);
     $commandTester->execute(array('command' => $command->getName()));
 }