Browse Source

added test for #10346, needed for PR #10349

Brady Pacha 9 years ago
parent
commit
2713ef3dc0
1 changed files with 4 additions and 0 deletions
  1. 4 0
      tests/TestCase/Utility/TextTest.php

+ 4 - 0
tests/TestCase/Utility/TextTest.php

@@ -315,6 +315,10 @@ class TextTest extends TestCase
         $expected = ['tagA', '"single tag"', 'tagB'];
         $this->assertEquals($expected, $result);
 
+        $result = Text::tokenize('tagA "first tag" tagB "second tag" tagC', ' ', '"', '"');
+        $expected = ['tagA', '"first tag"', 'tagB', '"second tag"', 'tagC'];
+        $this->assertEquals($expected, $result);
+
         // Ideographic width space.
         $result = Text::tokenize("tagA\xe3\x80\x80\"single\xe3\x80\x80tag\"\xe3\x80\x80tagB", "\xe3\x80\x80", '"', '"');
         $expected = ['tagA', '"single tag"', 'tagB'];