00001 <?php 00002 require_once( 'SearchEngineTest.php' ); 00003 00004 class SearchMySQL4Test extends SearchEngineTest { 00005 var $db; 00006 00007 function __construct( $name ) { 00008 parent::__construct( $name ); 00009 } 00010 00011 function setUp() { 00012 $GLOBALS['wgContLang'] = new Language; 00013 $this->db = $this->buildTestDatabase( 00014 array( 'page', 'revision', 'text', 'searchindex' ) ); 00015 if( $this->db ) { 00016 $this->insertSearchData(); 00017 } 00018 $this->search = new SearchMySQL4( $this->db ); 00019 } 00020 00021 function tearDown() { 00022 if( !is_null( $this->db ) ) { 00023 $this->db->close(); 00024 } 00025 unset( $this->db ); 00026 unset( $this->search ); 00027 } 00028 00029 } 00030 00031