summaryrefslogtreecommitdiffstats
path: root/tests/codeigniter/helpers
diff options
context:
space:
mode:
authorBrennan Thompson <brenjt@gmail.com>2014-02-14 20:03:57 +0100
committerBrennan Thompson <brenjt@gmail.com>2014-02-14 20:03:57 +0100
commit6949f95f6e21980f36095490bf38fc8a172dbc0f (patch)
treeb3141f390acd0051396cda6a3da51c1f98384cca /tests/codeigniter/helpers
parent68a02a01a086bbb1b8128ea2744439de84873d11 (diff)
parent81f036753272391360ba5b64e6dd93c4101a8733 (diff)
Merge remote-tracking branch 'upstream/develop' into develop
Conflicts: system/helpers/form_helper.php
Diffstat (limited to 'tests/codeigniter/helpers')
-rw-r--r--tests/codeigniter/helpers/text_helper_test.php12
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>'));
}
// ------------------------------------------------------------------------