diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/codeigniter/helpers/text_helper_test.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/codeigniter/helpers/text_helper_test.php b/tests/codeigniter/helpers/text_helper_test.php index d75d26208..7a7dc0a12 100644 --- a/tests/codeigniter/helpers/text_helper_test.php +++ b/tests/codeigniter/helpers/text_helper_test.php @@ -106,17 +106,19 @@ class Text_helper_test extends CI_TestCase { public function test_highlight_phrase() { $strs = array( - 'this is a phrase' => '<strong>this is</strong> a phrase', - 'this is another' => '<strong>this is</strong> another', - 'Gimme a test, Sally' => 'Gimme a test, Sally', - 'Or tell me what this is' => 'Or tell me what <strong>this is</strong>', - '' => '' + 'this is a phrase' => '<mark>this is</mark> a phrase', + 'this is another' => '<mark>this is</mark> another', + 'Gimme a test, Sally' => 'Gimme a test, Sally', + 'Or tell me what this is' => 'Or tell me what <mark>this is</mark>', + '' => '' ); foreach ($strs as $str => $expect) { $this->assertEquals($expect, highlight_phrase($str, 'this is')); } + + $this->assertEquals('<strong>this is</strong> a strong test', highlight_phrase('this is a strong test', 'this is', '<strong>', '</strong>')); } // ------------------------------------------------------------------------ |