Esempio n. 1
0
 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
 }
Esempio n. 2
0
 /**
  * Render URL signature from the template
  *
  * @return string
  */
 protected function renderUrlSignature()
 {
     return sprintf(self::SIGNATURE_TEMPLATE, $this->deploymentVersion->getValue());
 }