summaryrefslogtreecommitdiff
path: root/tests/SearchMySQL4Test.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/SearchMySQL4Test.php')
-rw-r--r--tests/SearchMySQL4Test.php34
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/SearchMySQL4Test.php b/tests/SearchMySQL4Test.php
new file mode 100644
index 00000000..545af230
--- /dev/null
+++ b/tests/SearchMySQL4Test.php
@@ -0,0 +1,34 @@
+<?php
+
+require_once( 'SearchEngineTest.php' );
+require_once( '../includes/SearchMySQL4.php' );
+
+class SearchMySQL4Test extends SearchEngine_TestCase {
+ var $db;
+
+ function SearchMySQL4Test( $name ) {
+ $this->PHPUnit_TestCase( $name );
+ }
+
+ function setUp() {
+ $GLOBALS['wgContLang'] = new LanguageUtf8;
+ $this->db =& buildTestDatabase(
+ 'mysql4',
+ array( 'page', 'revision', 'text', 'searchindex' ) );
+ if( $this->db ) {
+ $this->insertSearchData();
+ }
+ $this->search =& new SearchMySQL4( $this->db );
+ }
+
+ function tearDown() {
+ if( !is_null( $this->db ) ) {
+ $this->db->close();
+ }
+ unset( $this->db );
+ unset( $this->search );
+ }
+
+}
+
+?> \ No newline at end of file