Skip to content
This repository
Browse code

[Form] tweaked previous merge

  • Loading branch information...
commit 3138332152bf3c63f47717aa3298c9ccee444f21 1 parent 13319da
Fabien Potencier authored
14  src/Symfony/Component/Form/Tests/Extension/Core/EventListener/TrimListenerTest.php
@@ -50,13 +50,13 @@ public function testTrimSkipNonStrings()
50 50
     /**
51 51
      * @dataProvider codePointProvider
52 52
      */
53  
-    public function testTrimUtf8($description, $chars)
  53
+    public function testTrimUtf8($chars)
54 54
     {
55 55
         if (!function_exists('mb_check_encoding')) {
56 56
             $this->markTestSkipped('The "mb_check_encoding" function is not available');
57 57
         }
58 58
 
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');
60 60
         $data = $data."ab\ncd".$data;
61 61
 
62 62
         $form  = $this->getMock('Symfony\Component\Form\Tests\FormInterface');
@@ -65,17 +65,15 @@ public function testTrimUtf8($description, $chars)
65 65
         $filter = new TrimListener();
66 66
         $filter->preBind($event);
67 67
 
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));
69 69
     }
70 70
 
71 71
     public function codePointProvider()
72 72
     {
73 73
         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')),
79 77
         );
80 78
     }
81 79
 }

0 notes on commit 3138332

Please sign in to comment.
Something went wrong with that request. Please try again.