<?php
if( php_sapi_name() != 'cli' ) {
- die( 'Must be run from the command line.' );
+ echo 'Must be run from the command line.';
+ die( -1 );
}
error_reporting( E_ALL );
require_once( 'PHPUnit.php' );
$testOptions = array(
- 'mysql3' => array(
- 'server' => null,
- 'user' => null,
- 'password' => null,
- 'database' => null ),
'mysql4' => array(
'server' => null,
'user' => null,
$tests = array(
'GlobalTest',
'DatabaseTest',
- 'SearchMySQL3Test',
'SearchMySQL4Test',
'ArticleTest',
+ 'SanitizerTest',
);
foreach( $tests as $test ) {
require_once( $test . '.php' );
. $wgDBprefix . '\\1`', $create);
if ($create === $create_tmp) {
# Couldn't do replacement
- die("could not create temporary table $tbl");
+ wfDie( "could not create temporary table $tbl" );
}
$db->query($create_tmp);
}