Browse Source

Use Text class.

euromark 11 years ago
parent
commit
b0fcaae134
2 changed files with 3 additions and 3 deletions
  1. 1 1
      src/Utility/Text.php
  2. 2 2
      tests/TestCase/Utility/TextTest.php

+ 1 - 1
src/Utility/Text.php

@@ -318,7 +318,7 @@ class Text
     {
         $paragraphs = explode($break, $text);
         foreach ($paragraphs as &$paragraph) {
-            $paragraph = String::_wordWrap($paragraph, $width, $break, $cut);
+            $paragraph = static::_wordWrap($paragraph, $width, $break, $cut);
         }
         return implode($break, $paragraphs);
     }

+ 2 - 2
tests/TestCase/Utility/TextTest.php

@@ -397,7 +397,7 @@ TEXT;
     public function testWordWrapNewlineAware() {
         $text = 'This is a line that is almost the 55 chars long.
 This is a new sentence which is manually newlined, but is so long it needs two lines.';
-        $result = String::wordWrap($text, 55);
+        $result = Text::wordWrap($text, 55);
         $expected = <<<TEXT
 This is a line that is almost the 55 chars long.
 This is a new sentence which is manually newlined, but
@@ -427,7 +427,7 @@ TEXT;
 This is the song th
 at never ends. This
  is the song that n
-ever ends. This is 
+ever ends. This is
 the song that never
  ends.
 TEXT;