/**
  * @dataProvider provideGetName
  */
 public function testGetName($structureType, $name, $expectedName)
 {
     $this->properties->setLanguage('de');
     $this->properties->setStructureType($structureType);
     $res = $this->properties->getName($name);
     $this->assertEquals($expectedName, $res);
 }
Esempio n. 2
0
 /**
  * {@inheritdoc}
  */
 public function setLanguageCode($languageCode, $languageNamespace, $namespace)
 {
     // build namespace
     $namespaces = [];
     if (!empty($namespace)) {
         $namespaces[] = $namespace;
     }
     if (!empty($this->additionalPrefix)) {
         $namespaces[] = $this->additionalPrefix;
     }
     $this->translatedProperties = new MultipleTranslatedProperties($this->properties, $languageNamespace, implode('-', $namespaces));
     $this->translatedProperties->setLanguage($languageCode);
 }
Esempio n. 3
0
 /**
  * Configures translated properties to given locale.
  *
  * @param string $locale
  */
 protected function setLocale($locale)
 {
     $this->translatedProperties->setLanguage($locale);
 }