dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Change php extract() to explicit code"
[lhc/web/wiklou.git]
/
tests
/
phpunit
/
includes
/
debug
/
MWDebugTest.php
diff --git
a/tests/phpunit/includes/debug/MWDebugTest.php
b/tests/phpunit/includes/debug/MWDebugTest.php
index
9c2bc75
..
25cfd3c
100644
(file)
--- a/
tests/phpunit/includes/debug/MWDebugTest.php
+++ b/
tests/phpunit/includes/debug/MWDebugTest.php
@@
-4,20
+4,20
@@
class MWDebugTest extends MediaWikiTestCase {
protected function setUp() {
parent::setUp();
protected function setUp() {
parent::setUp();
- // Make sure MWDebug class is enabled
- static $MWDebugEnabled = false;
- if ( !$MWDebugEnabled ) {
- MWDebug::init();
- $MWDebugEnabled = true;
- }
/** Clear log before each test */
MWDebug::clearLog();
/** Clear log before each test */
MWDebug::clearLog();
+ }
+
+ public static function setUpBeforeClass() {
+ parent::setUpBeforeClass();
+ MWDebug::init();
MediaWiki\suppressWarnings();
}
MediaWiki\suppressWarnings();
}
- protected function tearDown() {
+ public static function tearDownAfterClass() {
+ parent::tearDownAfterClass();
+ MWDebug::deinit();
MediaWiki\restoreWarnings();
MediaWiki\restoreWarnings();
- parent::tearDown();
}
/**
}
/**
@@
-110,7
+110,7
@@
class MWDebugTest extends MediaWikiTestCase {
$this->assertArrayHasKey( $expectedKey, $data['debuginfo'], "debuginfo has $expectedKey" );
}
$this->assertArrayHasKey( $expectedKey, $data['debuginfo'], "debuginfo has $expectedKey" );
}
- $xml = ApiFormatXml::recXmlPrint( 'help', $data );
+ $xml = ApiFormatXml::recXmlPrint( 'help', $data
, null
);
// exception not thrown
$this->assertInternalType( 'string', $xml );
// exception not thrown
$this->assertInternalType( 'string', $xml );