public function testUpdateAssetVersion()
 {
     $this->cache->expects($this->once())->method('fetch')->with('test')->willReturn(123);
     $this->cache->expects($this->once())->method('save')->with('test')->willReturn(124);
     $this->assetVersionManager->updateAssetVersion('test');
     $this->assertSame('124', $this->assetVersionManager->getAssetVersion('test'));
 }
 /**
  * {@inheritdoc}
  */
 public function getVersion($path)
 {
     $dynamicVersion = $this->assetVersionManager->getAssetVersion($this->packageName);
     return !empty($dynamicVersion) ? $this->staticVersion . '-' . $dynamicVersion : $this->staticVersion;
 }
Пример #3
0
 /**
  * @param ConsoleCommandEvent $event
  */
 public function onConsoleCommand(ConsoleCommandEvent $event)
 {
     if ('fos:js-routing:dump' === $event->getCommand()->getName()) {
         $this->assetVersionManager->updateAssetVersion('routing');
     }
 }