function testGlob() { SimpleAsset::config(array('asset_dir' => dirname(__FILE__) . '/public')); $files = new SimpleAssetFiles(); $paths = $files->glob(); sort($paths); $this->assertEquals(array('/images/icon.png', '/images/main.jpg', '/javascripts/application.js', '/stylesheets/application.css'), $paths); }
/** * @param array $config */ public static function precompile($config = null) { if (is_array($config) && sizeof($config) > 0) { SimpleAsset::config($config); } $store = SimpleAssetStore::factory(); $files = new SimpleAssetFiles(); foreach ($files->glob() as $path) { $store->setDigest($path); } }