From 0bb32d3c71bfc797c64b0c6611c520f5beef5621 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 7 Jan 2014 16:30:42 +0200 Subject: Update Text helper highlight_phrase() tests and add one for custom tags --- tests/codeigniter/helpers/text_helper_test.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'tests/codeigniter/helpers') 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' => 'this is a phrase', - 'this is another' => 'this is another', - 'Gimme a test, Sally' => 'Gimme a test, Sally', - 'Or tell me what this is' => 'Or tell me what this is', - '' => '' + 'this is a phrase' => 'this is a phrase', + 'this is another' => 'this is another', + 'Gimme a test, Sally' => 'Gimme a test, Sally', + 'Or tell me what this is' => 'Or tell me what this is', + '' => '' ); foreach ($strs as $str => $expect) { $this->assertEquals($expect, highlight_phrase($str, 'this is')); } + + $this->assertEquals('this is a strong test', highlight_phrase('this is a strong test', 'this is', '', '')); } // ------------------------------------------------------------------------ -- cgit v1.2.3-24-g4f1b