예제 #1
0
 /**
  * @testdox getVarName() returns the assigned variable name
  */
 public function testGetVarName()
 {
     $configValue = new ConfigValue([], 'foo');
     $this->assertSame('foo', $configValue->getVarName());
 }
예제 #2
0
 /**
  * Encode a ConfigValue instance into JavaScript
  *
  * @param  ConfigValue $configValue
  * @return string
  */
 protected function encodeConfigValue(ConfigValue $configValue)
 {
     return $configValue->isDeduplicated() ? $configValue->getVarName() : $this->encode($configValue->getValue());
 }