* @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;
global $wgDummyLazy;
$called = false;
- $factory = function() use ( &$called ) {
+ $factory = function () use ( &$called ) {
$called = true;
return new HashBagOStuff();
};