X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2FDeprecatedGlobalTest.php;h=237e3fb7b70db27efa22aaedf2fd8c395c634032;hb=5155abe0e6ab6589d4104a221df0a0b2c5142c16;hp=76a4f515dd2ffed7a8904d9b37f978ae03959c47;hpb=1abc89fc7651e122ca53fe874eecb89f30b5ba35;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(); };