PHPUnit tests:
authorMax Semenik <maxsem@users.mediawiki.org>
Tue, 2 Feb 2010 20:53:28 +0000 (20:53 +0000)
committerMax Semenik <maxsem@users.mediawiki.org>
Tue, 2 Feb 2010 20:53:28 +0000 (20:53 +0000)
* include Setup.php in bootstrap to avoid fatals
* require --> require_once, was causing problems
* require_once "foo.php" --> require_once( "foo.php" ), that's MediaWiki common practice

tests/ImageFunctionsTest.php
tests/LanguageConverterTest.php
tests/LocalFileTest.php
tests/SearchEngineTest.php
tests/bootstrap.php

index fbd6f50..f06bc88 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-require 'ImageFunctions.php';
+require_once( 'ImageFunctions.php' );
 
 class ImageFunctionsTest extends PHPUnit_Framework_TestCase {
        function testFitBoxWidth() {
index 63d1cf0..8d79177 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-require_once 'ProxyTools.php';
+require_once( 'ProxyTools.php' );
 
 class LanguageConverterTest extends PHPUnit_Framework_TestCase {
        protected $lang = null;
index ef2be37..407ea6b 100644 (file)
@@ -4,7 +4,7 @@
  * These tests should work regardless of $wgCapitalLinks
  */
 
-require 'Namespace.php';
+require_once( 'Namespace.php' );
 
 class LocalFileTest extends PHPUnit_Framework_TestCase {
        function setUp() {
index 8d85e3f..dc5023f 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-require_once 'MediaWiki_TestCase.php';
+require_once( 'MediaWiki_TestCase.php' );
 
 /** @todo document
  */
index 0eec5b2..a576f66 100644 (file)
@@ -14,11 +14,13 @@ $IP = dirname( dirname( __FILE__ ) );
 define( 'MEDIAWIKI', true );
 define( 'MW_PHPUNIT_TEST', true );
 
-require_once "$IP/includes/Defines.php";
-require_once "$IP/includes/AutoLoader.php";
-require_once "$IP/LocalSettings.php";
-require_once "$IP/includes/ProfilerStub.php";
-require_once "$IP/includes/GlobalFunctions.php";
-require_once "$IP/includes/Hooks.php";
+require_once( "$IP/includes/Defines.php" );
+require_once( "$IP/includes/AutoLoader.php" );
+require_once( "$IP/LocalSettings.php" );
+require_once( "$IP/includes/ProfilerStub.php" );
+require_once( "$IP/includes/GlobalFunctions.php" );
+require_once( "$IP/includes/Hooks.php" );
+$self = __FILE__;
+require_once( "$IP/includes/Setup.php" );