Browse Source

ZF-8342: backport r19134 to trunk

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@19135 44c647ce-9c0f-0410-b52a-842ac1e357ba
matthew 16 years ago
parent
commit
fcb180b515
1 changed files with 13 additions and 1 deletions
  1. 13 1
      tests/Zend/Form/Element/SelectTest.php

+ 13 - 1
tests/Zend/Form/Element/SelectTest.php

@@ -76,7 +76,9 @@ class Zend_Form_Element_SelectTest extends PHPUnit_Framework_TestCase
     public function getView()
     {
         require_once 'Zend/View.php';
-        $view = new Zend_View();
+        $view = new Zend_View(array(
+            'encoding' => 'UTF-8',
+        ));
         $view->addHelperPath(dirname(__FILE__) . '/../../../../library/Zend/View/Helper');
         return $view;
     }
@@ -242,6 +244,16 @@ class Zend_Form_Element_SelectTest extends PHPUnit_Framework_TestCase
     }
 
     /**
+     * @group ZF-8342
+     */
+    public function testUsingPoundSymbolInOptionLabelShouldRenderCorrectly()
+    {
+        $this->element->addMultiOption('1', '£' . number_format(1));
+        $html = $this->element->render($this->getView());
+        $this->assertContains('>£', $html);
+    }
+
+    /**
      * Used by test methods susceptible to ZF-2794, marks a test as incomplete
      *
      * @link   http://framework.zend.com/issues/browse/ZF-2794