* Added wfDie() wrapper, and some manual die(-1), to force the return code
[lhc/web/wiklou.git] / tests / RunTests.php
index 81ed74a..020dba4 100644 (file)
@@ -1,7 +1,8 @@
 <?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 );
@@ -74,7 +75,7 @@ function &buildTestDatabase( $serverType, $tables ) {
                                        . $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);
                        }