From 8f416baead93a48e5799e44b8bd2e2c4859f4e04 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Fri, 14 Sep 2007 13:18:58 +0200 Subject: auf Version 1.11 aktualisiert; Login-Bug behoben --- tests/SearchEngineTest.php | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) (limited to 'tests/SearchEngineTest.php') diff --git a/tests/SearchEngineTest.php b/tests/SearchEngineTest.php index 0a02c49c..0ae14bdd 100644 --- a/tests/SearchEngineTest.php +++ b/tests/SearchEngineTest.php @@ -1,18 +1,9 @@ fetchObject() ) { - $matches[] = intval( $row->page_id ); + while( $row = $results->next() ) { + $matches[] = $row->getTitle()->getPrefixedText(); } $results->free(); # Search is not guaranteed to return results in a certain order; @@ -91,7 +82,7 @@ END $this->assertFalse( is_null( $this->db ), "Can't find a database to test with." ); if( !is_null( $this->db ) ) { $this->assertEquals( - array( 3 ), + array( 'Smithee' ), $this->fetchIds( $this->search->searchText( 'smithee' ) ), "Plain search failed" ); } @@ -102,7 +93,10 @@ END if( !is_null( $this->db ) ) { $this->search->setNamespaces( array( 0, 1, 4 ) ); $this->assertEquals( - array( 2, 3 ), + array( + 'Smithee', + 'Talk:Main Page', + ), $this->fetchIds( $this->search->searchText( 'smithee' ) ), "Power search failed" ); } @@ -112,7 +106,10 @@ END $this->assertFalse( is_null( $this->db ), "Can't find a database to test with." ); if( !is_null( $this->db ) ) { $this->assertEquals( - array( 3, 9 ), + array( + 'Alan Smithee', + 'Smithee', + ), $this->fetchIds( $this->search->searchTitle( 'smithee' ) ), "Title search failed" ); } @@ -123,7 +120,11 @@ END if( !is_null( $this->db ) ) { $this->search->setNamespaces( array( 0, 1, 4 ) ); $this->assertEquals( - array( 3, 4, 9 ), + array( + 'Alan Smithee', + 'Smithee', + 'Talk:Smithee', + ), $this->fetchIds( $this->search->searchTitle( 'smithee' ) ), "Title power search failed" ); } @@ -132,4 +133,4 @@ END } -?> + -- cgit v1.2.2