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