/** * Ensures that the filter follows expected behavior for multibyte characters * * @return void */ public function testMultiByte() { $this->markTestIncomplete('Multibyte testing incomplete'); if (!$this->_filter->getUnicodeEnabled()) { $this->markTestSkipped('Multibyte test not run; Unicode PCRE is not supported on this platform'); } /** * The first element of $valuesExpected contains multibyte digit characters. * But , Zend_Filter_Digits is expected to return only singlebyte digits. * * The second contains multibyte or singebyte space, and also alphabet. * The third contains various multibyte characters. * The last contains only singlebyte digits. */ $valuesExpected = array( '192八3四8' => '123', 'C 4.5B 6' => '456', '9壱8@7.6,5#4' => '987654', '789' => '789' ); foreach ($valuesExpected as $input => $output) { $this->assertEquals( $output, $result = $this->_filter->filter($input), "Expected '$input' to filter to '$output', but received '$result' instead" ); } }
/** * Ensures that the filter follows expected behavior for multibyte characters * * @return void */ public function testMultiByte() { if (!$this->_filter->getUnicodeEnabled()) { $this->markTestSkipped('Multibyte test not run; Unicode PCRE is not supported on this platform'); } $valuesExpected = array( '一' => '一' ); foreach ($valuesExpected as $input => $output) { $this->assertEquals( $output, $result = $this->_filter->filter($input), "Expected '$input' to filter to '$output', but received '$result' instead" ); } }