28 $this->oldErrorLevel = error_reporting( -1 );
32 error_reporting( $this->oldErrorLevel );
40 $this->assertInstanceOf( DeprecatedGlobal::class, $wgDummy );
44 $wgDummy->get(
'foo' );
46 $this->assertInstanceOf( HashBagOStuff::class, $wgDummy );
53 $factory =
function () use ( &
$called ) {
59 $this->assertInstanceOf( DeprecatedGlobal::class, $wgDummyLazy );
64 $wgDummyLazy->get(
'foo' );
66 $this->assertInstanceOf( HashBagOStuff::class, $wgDummyLazy );
77 $wgDummy1->get(
'foo' );
78 $this->assertInstanceOf( HashBagOStuff::class, $wgDummy1 );
testWarning()
PHPUnit_Framework_Error Use of $wgDummy1 was deprecated in MediaWiki 1.30.
Class to allow throwing wfDeprecated warnings when people use globals that we do not want them to.
Simple store for keeping values in an associative array for the current process.