public function testClearCache() { $classes = $this->c->getClasses('Command', [__DIR__ . '/assets']); $this->assertFileExists($this->location . 'CommandCacheMap.yml'); $this->c->clearCache(['Command']); $this->assertFileNotExists($this->location . 'CommandCacheMap.yml'); }
/** * @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); }