/** * @expectedException \Exception * @expectedExceptionMessage Command not found: /i/dont/exist */ public function testAddNoneExistantSymfonyCommands() { $cl = new CommandLoader($this->app); $st = '/i/dont/exist'; $commands = $cl->createSymfonyCommands([$st]); }
/** * @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); }