wiki.techinc.nl/maintenance/tests/SearchMySQLTest.php
Mark A. Hershberger 04b2413aac * Make tests work better together. Tests are now skipped or marked incomplete.
* Make it possible to call deleteArchived{Revisions,Files} from within tests to do cleanup.
2010-02-25 04:37:21 +00:00

29 lines
674 B
PHP

<?php
require_once( 'SearchEngineTest.php' );
class SearchMySQLTest extends SearchEngineTest {
var $db;
function setUp() {
global $wgDBprefix;
if($wgDBprefix === "parsertest_") $this->markTestSkipped("This test can't (yet?) be run with the parser tests");
$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 );
}
}