Преглед изворни кода

updated tests to provide more useful examples

everzet пре 13 година
родитељ
комит
4a6cd217f1

+ 2 - 2
tests/Gedmo/Translator/Fixture/Person.php

@@ -73,9 +73,9 @@ class Person
         $this->translations = new ArrayCollection();
     }
 
-    public function translate($locale = null)
+    public function translate($locale = 'en')
     {
-        if (null === $locale) {
+        if ('en' === $locale) {
             return $this;
         }
 

+ 1 - 1
tests/Gedmo/Translator/TranslatableTest.php

@@ -89,7 +89,7 @@ class TranslatableTest extends BaseTestCaseORM
     public function testTranslatableWithMagicProperties()
     {
         $person = new Person();
-        $person->setName('Jen');
+        $person->translate('en')->setName('Jen');
         $person->translate('ru_RU')->name = 'Женя';
         $person->translate('ru_RU')->description = 'multilingual description';