MediaWiki REL1_31
bootstrap.php
Go to the documentation of this file.
1<?php
9if ( !defined( 'MW_PHPUNIT_TEST' ) ) {
10 echo <<<EOF
11You are running these tests directly from phpunit. You may not have all globals correctly set.
12Running phpunit.php instead is recommended.
13EOF;
14 require_once __DIR__ . "/phpunit.php";
15}
16
18 public function __destruct() {
19 // Return to real wiki db, so profiling data is preserved
20 MediaWikiTestCase::teardownTestDB();
21
22 // Log profiling data, e.g. in the database or UDP
24 }
25
26}
27
28// This will be destructed after all tests have been run
wfLogProfilingData()
$mediawikiPHPUnitBootstrap
Definition bootstrap.php:29
globals will be eliminated from MediaWiki replaced by an application object which would be passed to constructors Whether that would be an convenient solution remains to be but certainly PHP makes such object oriented programming models easier than they were in previous versions For the time being MediaWiki programmers will have to work in an environment with some global context At the time of globals were initialised on startup by MediaWiki of these were configuration which are documented in DefaultSettings php There is no comprehensive documentation for the remaining globals
Definition globals.txt:39