2004-10-20 09:56:34 +00:00
|
|
|
<?php
|
|
|
|
|
require_once( 'SearchEngineTest.php' );
|
|
|
|
|
|
2007-06-06 18:37:35 +00:00
|
|
|
class SearchMySQL4Test extends SearchEngineTest {
|
2004-10-20 09:56:34 +00:00
|
|
|
var $db;
|
2006-01-07 13:31:29 +00:00
|
|
|
|
2007-06-06 18:37:35 +00:00
|
|
|
function __construct( $name ) {
|
|
|
|
|
parent::__construct( $name );
|
2004-10-20 09:56:34 +00:00
|
|
|
}
|
2006-01-07 13:31:29 +00:00
|
|
|
|
2004-10-20 09:56:34 +00:00
|
|
|
function setUp() {
|
2006-08-06 14:23:53 +00:00
|
|
|
$GLOBALS['wgContLang'] = new Language;
|
2007-06-06 18:37:35 +00:00
|
|
|
$this->db = $this->buildTestDatabase(
|
2004-12-19 08:00:50 +00:00
|
|
|
array( 'page', 'revision', 'text', 'searchindex' ) );
|
2004-10-20 09:56:34 +00:00
|
|
|
if( $this->db ) {
|
|
|
|
|
$this->insertSearchData();
|
|
|
|
|
}
|
2006-07-11 14:11:23 +00:00
|
|
|
$this->search = new SearchMySQL4( $this->db );
|
2004-10-20 09:56:34 +00:00
|
|
|
}
|
2006-01-07 13:31:29 +00:00
|
|
|
|
2004-10-20 09:56:34 +00:00
|
|
|
function tearDown() {
|
|
|
|
|
if( !is_null( $this->db ) ) {
|
|
|
|
|
$this->db->close();
|
|
|
|
|
}
|
|
|
|
|
unset( $this->db );
|
|
|
|
|
unset( $this->search );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2007-06-29 01:19:14 +00:00
|
|
|
|