示例#1
0
 protected function getApp($boot = true)
 {
     $app = parent::getApp();
     $app['asset.file.hash'] = $app->protect(function ($fileName) {
         return md5($fileName);
     });
     return $app;
 }
示例#2
0
 protected function getApp($boot = true)
 {
     $app = parent::getApp();
     $mock = $this->getMock('\\Bolt\\Asset\\BoltVersionStrategy', ['getVersion'], [$app['filesystem']->getFilesystem('extensions'), $app['asset.salt']]);
     $mock->expects($this->any())->method('getVersion')->will($this->returnCallback(function ($fileName) {
         return md5($fileName);
     }));
     $app['asset.version_strategy'] = $app->protect(function () use($mock) {
         return $mock;
     });
     return $app;
 }