public function testGetValueDefaultModeSaving()
 {
     $this->appState->expects($this->once())->method('getMode')->will($this->returnValue(\Magento\Framework\App\State::MODE_DEFAULT));
     $storageException = new \UnexpectedValueException('Does not exist in the storage');
     $this->versionStorage->expects($this->once())->method('load')->will($this->throwException($storageException));
     $this->versionStorage->expects($this->once())->method('save')->with($this->equalTo(time(), 5));
     $this->assertEquals(time(), $this->object->getValue());
     $this->object->getValue();
     // Ensure caching in memory
 }
Exemple #2
0
 /**
  * Render URL signature from the template
  *
  * @return string
  */
 protected function renderUrlSignature()
 {
     return sprintf(self::SIGNATURE_TEMPLATE, $this->deploymentVersion->getValue());
 }