Add parser method to call parser functions
[mediawiki.git] / tests / phpunit / bootstrap.php
blob01caf8f478cba93f8cfd5bd7b1c240373771ffa1
1 <?php
2 /**
3 * Bootstrapping for MediaWiki PHPUnit tests
4 * This file is included by phpunit and is NOT in the global scope.
6 * @file
7 */
9 if ( !defined( 'MW_PHPUNIT_TEST' ) ) {
10 echo <<<EOF
11 You are running these tests directly from phpunit. You may not have all globals correctly set.
12 Running phpunit.php instead is recommended.
13 EOF;
14 require_once ( __DIR__ . "/phpunit.php" );
17 // Output a notice when running with older versions of PHPUnit
18 if ( version_compare( PHPUnit_Runner_Version::id(), "3.6.7", "<" ) ) {
19 echo <<<EOF
20 ********************************************************************************
22 These tests run best with version PHPUnit 3.6.7 or better. Earlier versions may
23 show failures because earlier versions of PHPUnit do not properly implement
24 dependencies.
26 ********************************************************************************
28 EOF;
31 /** @todo Check if this is really needed */
32 MessageCache::destroyInstance();