Ver Fonte

[TESTS] Fixed order-of-operations issue in RadioButton test

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@18606 44c647ce-9c0f-0410-b52a-842ac1e357ba
matthew há 16 anos atrás
pai
commit
a263c09f79
1 ficheiros alterados com 9 adições e 2 exclusões
  1. 9 2
      tests/Zend/Dojo/Form/Element/RadioButtonTest.php

+ 9 - 2
tests/Zend/Dojo/Form/Element/RadioButtonTest.php

@@ -147,17 +147,24 @@ class Zend_Dojo_Form_Element_RadioButtonTest extends PHPUnit_Framework_TestCase
 
     public function testOptionsShouldBeTranslatable()
     {
+        require_once 'Zend/Translate.php';
         $translations = array(
             'Foo' => 'This is Foo',
             'Bar' => 'This is Bar',
             'Baz' => 'This is Baz',
         );
-        require_once 'Zend/Translate.php';
         $translate = new Zend_Translate('array', $translations, 'en');
         $this->element->setTranslator($translate);
+
+        $this->element->setMultiOptions(array(
+            'foo' => 'Foo',
+            'bar' => 'Bar',
+            'baz' => 'Baz',
+        ));
+
         $html = $this->element->render();
         foreach ($translations as $string) {
-            $this->assertContains($string, $html);
+            $this->assertContains($string, $html, $html);
         }
     }