public function getResources(&$resources = [], $moduleList = null) { $moduleList = isset($moduleList) ? $moduleList : $this->system->module_stack; $appResourcePaths = $this->getAssets($moduleList); // Get assets $resources = $this->resourceManager->manage($appResourcePaths); }
public function setUp() { $this->fileManager = new LocalFileManager(); $this->resource = new ResourceManager($this->fileManager); // Switch paths to testing environment ResourceManager::$excludeFolders = ['*/tests/cache/*']; ResourceManager::$projectRoot = __DIR__ . '/'; ResourceManager::$webRoot = __DIR__ . '/www/'; ResourceManager::$cacheRoot = __DIR__ . '/cache/'; // Remove cache folder if ($this->fileManager->exists(ResourceManager::$cacheRoot)) { $this->fileManager->remove(ResourceManager::$cacheRoot); } // Create files for ($i = 1; $i < 3; $i++) { $parent = implode('/', array_fill(0, $i, 'folder')); foreach (ResourceManager::TYPES as $type) { $file = $parent . '/test' . $i . '.' . $type; $this->fileManager->write(__DIR__ . '/' . $file, '/** TEST */'); $this->files[] = $file; } } }