wiki.techinc.nl/tests/SearchMySQL4Test.php
Brion Vibber 8ffff3e2e0 Reorganization of SearchEngine for legibility
* Removed 'fuzzy title search', it's not been maintained and generally produces unexpected and unwanted results
* Separated search guts (in SearchEngine) from display/control (in SpecialSearch)
* Extracted MySQL3 and MySQL4 variants to subclasses
* Added PHPUnit tests for MySQL3 and MySQL4 search engines, which try to use temporary tables to fiddle in (if configured)
* comments n stuff
2004-10-20 09:56:34 +00:00

34 lines
No EOL
638 B
PHP

<?php
require_once( 'SearchEngineTest.php' );
require_once( '../includes/SearchMySQL4.php' );
class SearchMySQL4Test extends SearchEngine_TestCase {
var $db;
function SearchMySQL4Test( $name ) {
$this->PHPUnit_TestCase( $name );
}
function setUp() {
$GLOBALS['wgContLang'] = new LanguageUtf8;
$this->db =& buildTestDatabase(
'mysql4',
array( 'cur', 'searchindex' ) );
if( $this->db ) {
$this->insertSearchData();
}
$this->search =& new SearchMySQL4( $this->db );
}
function tearDown() {
if( !is_null( $this->db ) ) {
$this->db->close();
}
unset( $this->db );
unset( $this->search );
}
}
?>