Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[Form] tweaked previous merge

  • Loading branch information...
commit 3138332152bf3c63f47717aa3298c9ccee444f21 1 parent 13319da
Fabien Potencier fabpot authored
14 src/Symfony/Component/Form/Tests/Extension/Core/EventListener/TrimListenerTest.php
View
@@ -50,13 +50,13 @@ public function testTrimSkipNonStrings()
/**
* @dataProvider codePointProvider
*/
- public function testTrimUtf8($description, $chars)
+ public function testTrimUtf8($chars)
{
if (!function_exists('mb_check_encoding')) {
$this->markTestSkipped('The "mb_check_encoding" function is not available');
}
- $data = mb_convert_encoding(pack('H*', implode('', (array)$chars)), 'UTF-8', 'UCS-2BE');
+ $data = mb_convert_encoding(pack('H*', implode('', $chars)), 'UTF-8', 'UCS-2BE');
$data = $data."ab\ncd".$data;
$form = $this->getMock('Symfony\Component\Form\Tests\FormInterface');
@@ -65,17 +65,15 @@ public function testTrimUtf8($description, $chars)
$filter = new TrimListener();
$filter->preBind($event);
- $this->assertSame("ab\ncd", $event->getData(), 'TrimListener should trim character(s): '.$description.': '.implode(', ', $chars));
+ $this->assertSame("ab\ncd", $event->getData(), 'TrimListener should trim character(s): '.implode(', ', $chars));
}
public function codePointProvider()
{
return array(
- array('General category: Separator',
- array('0020', '00A0', '1680', '180E', '2000', '2001', '2002', '2003', '2004', '2005',
- '2006', '2007', '2008', '2009', '200A', '2028', '2029', '202F', '205F', '3000')),
- array('General category: Other, control', array('0009', '000A', '000B', '000C', '000D', '0085')),
-// array('General category: Other, format. ZERO WIDTH SPACE', '200B')
+ 'General category: Separator' => array(array('0020', '00A0', '1680', '180E', '2000', '2001', '2002', '2003', '2004', '2005', '2006', '2007', '2008', '2009', '200A', '2028', '2029', '202F', '205F', '3000')),
+ 'General category: Other, control' => array(array('0009', '000A', '000B', '000C', '000D', '0085')),
+ //'General category: Other, format. ZERO WIDTH SPACE' => array(array('200B')),
);
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.