public function testFindAndInclude() { $cl = new CommandLoader($this->app); $cl->setVendorExtension('/test_localVendor'); $st = 'twhiston\\tg\\RoboCommand\\NoLoadRoboTest'; $commands = $cl->createRoboCommands([$st]); $this->assertCount(1, $commands); $this->assertInstanceOf('Symfony\\Component\\Console\\Command\\Command', $commands[0]); }
/** * @param CommandLoader $commandLoader * If libdev mode is on this will examine the local src folder as well and will NOT cache anything */ protected function loadLocalSrc(CommandLoader $commandLoader) { if (file_exists($this->dir . '/src')) { $locations = [$this->dir . '/src']; $location = $commandLoader->getVendorExtension(); $commandLoader->setVendorExtension('/src'); $this->addCommands($commandLoader, $locations, $this->libDevMode); $commandLoader->setVendorExtension($location); } }