X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2FDeprecatedGlobalTest.php;h=237e3fb7b70db27efa22aaedf2fd8c395c634032;hb=2b6f3f0adc475da7eab1ef04dfe917e5536e6e10;hp=76a4f515dd2ffed7a8904d9b37f978ae03959c47;hpb=5d4099246e49ff3e2b369e329aaaf3286f883bcd;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/DeprecatedGlobalTest.php b/tests/phpunit/includes/DeprecatedGlobalTest.php index 76a4f515dd..237e3fb7b7 100644 --- a/tests/phpunit/includes/DeprecatedGlobalTest.php +++ b/tests/phpunit/includes/DeprecatedGlobalTest.php @@ -22,6 +22,17 @@ * @covers DeprecatedGlobal */ class DeprecatedGlobalTest extends MediaWikiTestCase { + + public function setUp() { + parent::setUp(); + $this->oldErrorLevel = error_reporting( -1 ); + } + + public function tearDown() { + error_reporting( $this->oldErrorLevel ); + parent::tearDown(); + } + public function testObjectDeStub() { global $wgDummy; @@ -39,7 +50,7 @@ class DeprecatedGlobalTest extends MediaWikiTestCase { global $wgDummyLazy; $called = false; - $factory = function() use ( &$called ) { + $factory = function () use ( &$called ) { $called = true; return new HashBagOStuff(); };