Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3138332

Browse files
committed
[Form] tweaked previous merge
1 parent 13319da commit 3138332

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/Symfony/Component/Form/Tests/Extension/Core/EventListener/TrimListenerTest.php

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ public function testTrimSkipNonStrings()
5050
/**
5151
* @dataProvider codePointProvider
5252
*/
53-
public function testTrimUtf8($description, $chars)
53+
public function testTrimUtf8($chars)
5454
{
5555
if (!function_exists('mb_check_encoding')) {
5656
$this->markTestSkipped('The "mb_check_encoding" function is not available');
5757
}
5858

59-
$data = mb_convert_encoding(pack('H*', implode('', (array)$chars)), 'UTF-8', 'UCS-2BE');
59+
$data = mb_convert_encoding(pack('H*', implode('', $chars)), 'UTF-8', 'UCS-2BE');
6060
$data = $data."ab\ncd".$data;
6161

6262
$form = $this->getMock('Symfony\Component\Form\Tests\FormInterface');
@@ -65,17 +65,15 @@ public function testTrimUtf8($description, $chars)
6565
$filter = new TrimListener();
6666
$filter->preBind($event);
6767

68-
$this->assertSame("ab\ncd", $event->getData(), 'TrimListener should trim character(s): '.$description.': '.implode(', ', $chars));
68+
$this->assertSame("ab\ncd", $event->getData(), 'TrimListener should trim character(s): '.implode(', ', $chars));
6969
}
7070

7171
public function codePointProvider()
7272
{
7373
return array(
74-
array('General category: Separator',
75-
array('0020', '00A0', '1680', '180E', '2000', '2001', '2002', '2003', '2004', '2005',
76-
'2006', '2007', '2008', '2009', '200A', '2028', '2029', '202F', '205F', '3000')),
77-
array('General category: Other, control', array('0009', '000A', '000B', '000C', '000D', '0085')),
78-
// array('General category: Other, format. ZERO WIDTH SPACE', '200B')
74+
'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')),
75+
'General category: Other, control' => array(array('0009', '000A', '000B', '000C', '000D', '0085')),
76+
//'General category: Other, format. ZERO WIDTH SPACE' => array(array('200B')),
7977
);
8078
}
8179
}

0 commit comments

Comments
 (0)