Exemplo n.º 1
0
 public function testAddRoboCommands()
 {
     $cl = new CommandLoader($this->app);
     $st = 'twhiston\\tg\\RoboCommand\\RoboTest';
     $commands = $cl->createRoboCommands([$st]);
     $this->assertCount(1, $commands);
     $this->assertInstanceOf('Symfony\\Component\\Console\\Command\\Command', $commands[0]);
 }
Exemplo n.º 2
0
Arquivo: Tg.php Projeto: twhiston/tg
 /**
  * @param CommandLoader $commandLoader
  * @param $locations
  */
 private function addCommands(CommandLoader $commandLoader, $locations, $bypassCache = false)
 {
     $classes = $this->classCache->getClasses('RoboCommand\\', $locations, $bypassCache);
     $commands = $commandLoader->createRoboCommands($classes, $this->passThroughArgs);
     $this->app->addCommands($commands);
     $classes = $this->classCache->getClasses('Command\\', $locations, $bypassCache);
     $commands = $commandLoader->createSymfonyCommands($classes);
     $this->app->addCommands($commands);
 }