/**
  * With translation
  * @covers jarekkozak\dict\DictionarySelectDecorator::values
  */
 public function testValuesTrans()
 {
     $comp = [1 => Dict1::VALUE1 . '-TRANSLATED-jarekkozak\\tests\\dict\\Dict1', 2 => Dict1::VALUE2 . '-TRANSLATED-jarekkozak\\tests\\dict\\Dict1'];
     $decorator = new DictionarySelectDecorator(new Dict1Translator());
     self::assertEquals($comp, $decorator->values(Dict1::getInstance()->values()));
 }
Exemplo n.º 2
0
 /**
  * @covers jarekkozak\dict\Dictionary::dictionary()
  */
 public function testDictionary()
 {
     self::assertEquals('jarekkozak\\tests\\dict\\Dict1', Dict1::getInstance()->dictionary());
 }
 /**
  * With translation
  * @covers ::values
  */
 public function testValuesTrans()
 {
     $comp = '[{"id":1,"text":"com.common.value1-TRANSLATED-jarekkozak\\\\tests\\\\dict\\\\Dict1"},{"id":2,"text":"com.common.value2-TRANSLATED-jarekkozak\\\\tests\\\\dict\\\\Dict1"}]';
     $decorator = new DictionaryJsonDecorator(new Dict1Translator());
     self::assertEquals($comp, $decorator->values(Dict1::getInstance()->values()));
 }