diff options
author | Joffrey Jaffeux <j.jaffeux@gmail.com> | 2012-06-06 15:12:37 +0200 |
---|---|---|
committer | Joffrey Jaffeux <j.jaffeux@gmail.com> | 2012-06-06 15:12:37 +0200 |
commit | 0ef92f6fa4a40d4a689eee3ebd7eb7d632fe29c0 (patch) | |
tree | 39e69f6b7c565ec163e1c11573138b163d70bca4 | |
parent | 5ace440aa4dbd948191c37b67b01871b3a7593e9 (diff) |
test for word_wrap()
-rw-r--r-- | tests/codeigniter/helpers/text_helper_test.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/codeigniter/helpers/text_helper_test.php b/tests/codeigniter/helpers/text_helper_test.php index a83c7e74d..974247c4f 100644 --- a/tests/codeigniter/helpers/text_helper_test.php +++ b/tests/codeigniter/helpers/text_helper_test.php @@ -156,4 +156,12 @@ class Text_helper_test extends CI_TestCase { // ------------------------------------------------------------------------ + public function test_word_wrap() + { + $string = "Here is a simple string of text that will help us demonstrate this function."; + $word_wraped = word_wrap($string, 25); + preg_match_all("/\r\n|\n/", $word_wraped, $matches); + $this->assertEquals(count($matches[0]), 4); + } + }
\ No newline at end of file |