Remove unused global $IP
[lhc/web/wiklou.git] / maintenance / tests / SearchDbTest.php
1 <?php
2 class SearchDbTest extends SearchEngineTest {
3 var $db;
4
5 function setUp() {
6 $this->db = wfGetDB( DB_MASTER );
7 if ( !$this->db ) {
8 $this->markTestIncomplete( "Can't find a database to test with." );
9 }
10
11 $GLOBALS['wgContLang'] = new Language;
12 $this->insertSearchData();
13
14 $this->insertSearchData();
15 $searchType = preg_replace( "/Database/", "Search",
16 get_class( $this->db ) );
17 $this->search = new $searchType( $this->db );
18 }
19
20 function tearDown() {
21 $this->removeSearchData();
22 if ( !is_null( $this->db ) ) {
23 wfGetLB()->closeConnecton( $this->db );
24 }
25 unset( $this->db );
26 unset( $this->search );
27 }
28 }
29
30