protected function getApp($boot = true) { $app = parent::getApp(); $app['asset.file.hash'] = $app->protect(function ($fileName) { return md5($fileName); }); return $app; }
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; }