*/
class MediaWikiTestCaseTest extends MediaWikiTestCase {
- const GLOBAL_KEY_NONEXISTING = 'MediaWikiTestCaseTestGLOBAL-NONExisting';
-
private static $startGlobals = [
'MediaWikiTestCaseTestGLOBAL-ExistingString' => 'foo',
'MediaWikiTestCaseTestGLOBAL-ExistingStringEmpty' => '',
/**
* @covers MediaWikiTestCase::setLogger
- * @covers MediaWikiTestCase::restoreLogger
+ * @covers MediaWikiTestCase::restoreLoggers
*/
public function testLoggersAreRestoredOnTearDown_replacingExistingLogger() {
$logger1 = LoggerFactory::getInstance( 'foo' );
- $this->setLogger( 'foo', $this->getMock( LoggerInterface::class ) );
+ $this->setLogger( 'foo', $this->createMock( LoggerInterface::class ) );
$logger2 = LoggerFactory::getInstance( 'foo' );
$this->tearDown();
$logger3 = LoggerFactory::getInstance( 'foo' );
/**
* @covers MediaWikiTestCase::setLogger
- * @covers MediaWikiTestCase::restoreLogger
+ * @covers MediaWikiTestCase::restoreLoggers
*/
public function testLoggersAreRestoredOnTearDown_replacingNonExistingLogger() {
- $this->setLogger( 'foo', $this->getMock( LoggerInterface::class ) );
+ $this->setLogger( 'foo', $this->createMock( LoggerInterface::class ) );
$logger1 = LoggerFactory::getInstance( 'foo' );
$this->tearDown();
$logger2 = LoggerFactory::getInstance( 'foo' );
/**
* @covers MediaWikiTestCase::setLogger
- * @covers MediaWikiTestCase::restoreLogger
+ * @covers MediaWikiTestCase::restoreLoggers
*/
public function testLoggersAreRestoredOnTearDown_replacingSameLoggerTwice() {
$logger1 = LoggerFactory::getInstance( 'baz' );
- $this->setLogger( 'foo', $this->getMock( LoggerInterface::class ) );
- $this->setLogger( 'foo', $this->getMock( LoggerInterface::class ) );
+ $this->setLogger( 'foo', $this->createMock( LoggerInterface::class ) );
+ $this->setLogger( 'foo', $this->createMock( LoggerInterface::class ) );
$this->tearDown();
$logger2 = LoggerFactory::getInstance( 'baz' );