From 46f0b3abfb403b699601396bbd98e44a259b4057 Mon Sep 17 00:00:00 2001
From: Andreas Gohr <andi@splitbrain.org>
Date: Wed, 19 Mar 2008 21:29:09 +0100
Subject: [PATCH] fixed test cases for recent search highlight changes

darcs-hash:20080319202909-7ad00-422eb0c47bd1503b3f857ad43dfd258c900e1100.gz
---
 _test/cases/inc/html_hilight.test.php             | 8 ++++----
 _test/cases/inc/pageutils_resolve_pageid.test.php | 2 +-
 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){
-- 
GitLab