~ubuntu-branches/ubuntu/trusty/mediawiki/trusty

« back to all changes in this revision

Viewing changes to tests/phpunit/bootstrap.php

  • Committer: Package Import Robot
  • Author(s): Thorsten Glaser
  • Date: 2014-03-28 09:56:29 UTC
  • mfrom: (1.3.14)
  • Revision ID: package-import@ubuntu.com-20140328095629-1526y9tchdd507id
Tags: 1:1.19.14+dfsg-1
* New upstream security fix release (Closes: #742857):
  - (bug 62497) SECURITY: Add CSRF token on Special:ChangePassword
  - (bug 62467) Set a title for the context during import on the cli
* Use upstream-provided signing key bundle

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
/**
 
3
 * Bootstrapping for MediaWiki PHPUnit tests
 
4
 * This file is included by phpunit and is NOT in the global scope.
 
5
 *
 
6
 * @file
 
7
 */
 
8
 
 
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 ( dirname( __FILE__ ) . "/phpunit.php" );
 
15
}
 
16
 
 
17
// Output a notice when running with older versions of PHPUnit
 
18
if ( !version_compare( PHPUnit_Runner_Version::id(), "3.4.1", ">" ) ) {
 
19
  echo <<<EOF
 
20
********************************************************************************
 
21
 
 
22
These tests run best with version PHPUnit 3.4.2 or better. Earlier versions may
 
23
show failures because earlier versions of PHPUnit do not properly implement
 
24
dependencies.
 
25
 
 
26
********************************************************************************
 
27
 
 
28
EOF;
 
29
}
 
30
 
 
31
/** @todo Check if this is really needed */
 
32
MessageCache::destroyInstance();