summaryrefslogtreecommitdiff
path: root/maintenance/tests/SearchMySQLTest.php
blob: 526f621635244460f975b7fcfe2753fd6607b71d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
require_once( 'SearchEngineTest.php' );

class SearchMySQLTest extends SearchEngineTest {
	var $db;

	function setUp() {
		$GLOBALS['wgContLang'] = new Language;
		$this->db = $this->buildTestDatabase(
			array( 'page', 'revision', 'text', 'searchindex', 'user' ) );
		if( $this->db ) {
			$this->insertSearchData();
		}
		$this->search = new SearchMySQL( $this->db );
	}

	function tearDown() {
		if( !is_null( $this->db ) ) {
			wfGetLB()->closeConnecton( $this->db );
		}
		unset( $this->db );
		unset( $this->search );
	}
}