summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2008-03-19 21:29:09 +0100
committerAndreas Gohr <andi@splitbrain.org>2008-03-19 21:29:09 +0100
commit46f0b3abfb403b699601396bbd98e44a259b4057 (patch)
treececdf6b8d4eb40d88c595d389cdbb0ce04b76cde
parent92bcfa2abd28df99c56547421200f218edcb4b68 (diff)
downloadrpg-46f0b3abfb403b699601396bbd98e44a259b4057.tar.gz
rpg-46f0b3abfb403b699601396bbd98e44a259b4057.tar.bz2
fixed test cases for recent search highlight changes
darcs-hash:20080319202909-7ad00-422eb0c47bd1503b3f857ad43dfd258c900e1100.gz
-rw-r--r--_test/cases/inc/html_hilight.test.php8
-rw-r--r--_test/cases/inc/pageutils_resolve_pageid.test.php2
2 files changed, 5 insertions, 5 deletions
diff --git a/_test/cases/inc/html_hilight.test.php b/_test/cases/inc/html_hilight.test.php
index 634ef2585..85f224b6e 100644
--- a/_test/cases/inc/html_hilight.test.php
+++ b/_test/cases/inc/html_hilight.test.php
@@ -42,7 +42,7 @@ class html_hilight_test extends UnitTestCase{
$html = 'Foo bar Foo php Foo';
$this->assertPattern(
'/Foo <span.*>bar<\/span> Foo <span.*>php<\/span> Foo/',
- html_hilight($html,'bar php')
+ html_hilight($html,array('bar','php'))
);
}
@@ -50,7 +50,7 @@ class html_hilight_test extends UnitTestCase{
$html = 'Foo <b>bar</b> <i>Foo</i> php Foo';
$this->assertPattern(
'/Foo <b><span.*>bar<\/span><\/b> <i>Foo<\/i> <span.*>php<\/span> Foo/',
- html_hilight($html,'bar php')
+ html_hilight($html,array('bar','php'))
);
}
@@ -65,7 +65,7 @@ class html_hilight_test extends UnitTestCase{
function testHighlightPHP() {
$html = 'Foo $_GET[\'bar\'] Foo';
$this->assertEqual(
- 'Foo <span class="search_hit">$_GET</span>[\'<span class="search_hit">bar</span>\'] Foo',
+ 'Foo <span class="search_hit">$_GET[\'bar\']</span> Foo',
html_hilight($html,'$_GET[\'bar\']')
);
}
@@ -81,7 +81,7 @@ class html_hilight_test extends UnitTestCase{
function testMatchAttributeWord() {
$html = 'Foo <b class="x">bar</b> Foo';
$this->assertEqual(
- 'Foo <b class="x"><span class="search_hit">bar</span></b> Foo',
+ 'Foo <b class="x">bar</b> Foo',
html_hilight($html,'class="x">bar')
);
}
diff --git a/_test/cases/inc/pageutils_resolve_pageid.test.php b/_test/cases/inc/pageutils_resolve_pageid.test.php
index 738a7d2aa..ab282b57a 100644
--- a/_test/cases/inc/pageutils_resolve_pageid.test.php
+++ b/_test/cases/inc/pageutils_resolve_pageid.test.php
@@ -48,7 +48,7 @@ class init_resolve_pageid_test extends UnitTestCase {
$tests[] = array('foo','.:','foo:start');
$tests[] = array('','foo:','foo:start');
$tests[] = array('foo','foo:','foo:start');
- $tests[] = array('foo','playground:','playground:start');
+ $tests[] = array('foo','playground:','playground:playground');
foreach($tests as $test){