|
@@ -139,6 +139,28 @@ class TranslatableTest extends BaseTestCaseORM
|
|
|
$name = $personProxy->translate('ru_RU')->getName();
|
|
|
$this->assertSame('Женя', $name);
|
|
|
}
|
|
|
+
|
|
|
+ public function testTranslatableProxyWithUpperCaseProperty()
|
|
|
+ {
|
|
|
+ $person = new Person();
|
|
|
+ $person->setName('Jen');
|
|
|
+ $person->translate('ru_RU')->name = 'Женя';
|
|
|
+ $person->setLastName('Abramowicz');
|
|
|
+ $person->translate('ru_RU')->setLastName('Абрамович');
|
|
|
+ $person->setDescription('description');
|
|
|
+ $person->translate('ru_RU')->setDescription('multilingual description');
|
|
|
+
|
|
|
+ $this->em->persist($person);
|
|
|
+ $this->em->flush();
|
|
|
+ $this->em->clear();
|
|
|
+
|
|
|
+ $personProxy = $this->em->getReference(self::PERSON, array('id' => 1));
|
|
|
+ $this->assertTrue($personProxy instanceof Proxy);
|
|
|
+ $name = $personProxy->translate('ru_RU')->getName();
|
|
|
+ $this->assertSame('Женя', $name);
|
|
|
+ $lastName = $personProxy->translate('ru_RU')->getLastName();
|
|
|
+ $this->assertSame('Абрамович', $lastName);
|
|
|
+ }
|
|
|
|
|
|
public function testTranslatableWithMagicProperties()
|
|
|
{
|