jenkins-bot has submitted this change and it was merged.
Change subject: Use LoggerInterface::class in MediaWikiTestCaseTest
......................................................................
Use LoggerInterface::class in MediaWikiTestCaseTest
Change-Id: Ic9c24b813786bc4dc2d5aa48a17a958eef0a9ddb
---
M tests/phpunit/tests/MediaWikiTestCaseTest.php
1 file changed, 5 insertions(+), 4 deletions(-)
Approvals:
Legoktm: Looks good to me, approved
jenkins-bot: Verified
diff --git a/tests/phpunit/tests/MediaWikiTestCaseTest.php
b/tests/phpunit/tests/MediaWikiTestCaseTest.php
index 152c2eb..955dd2f 100644
--- a/tests/phpunit/tests/MediaWikiTestCaseTest.php
+++ b/tests/phpunit/tests/MediaWikiTestCaseTest.php
@@ -1,5 +1,6 @@
<?php
use MediaWiki\Logger\LoggerFactory;
+use Psr\Log\LoggerInterface;
/**
* @covers MediaWikiTestCase
@@ -105,7 +106,7 @@
public function testLoggersAreRestoredOnTearDown() {
// replacing an existing logger
$logger1 = LoggerFactory::getInstance( 'foo' );
- $this->setLogger( 'foo', $this->getMock(
'\Psr\Log\LoggerInterface' ) );
+ $this->setLogger( 'foo', $this->getMock( LoggerInterface::class
) );
$logger2 = LoggerFactory::getInstance( 'foo' );
$this->tearDown();
$logger3 = LoggerFactory::getInstance( 'foo' );
@@ -114,7 +115,7 @@
$this->assertNotSame( $logger1, $logger2 );
// replacing a non-existing logger
- $this->setLogger( 'bar', $this->getMock(
'\Psr\Log\LoggerInterface' ) );
+ $this->setLogger( 'foo', $this->getMock( LoggerInterface::class
) );
$logger1 = LoggerFactory::getInstance( 'bar' );
$this->tearDown();
$logger2 = LoggerFactory::getInstance( 'bar' );
@@ -124,8 +125,8 @@
// replacing same logger twice
$logger1 = LoggerFactory::getInstance( 'baz' );
- $this->setLogger( 'baz', $this->getMock(
'\Psr\Log\LoggerInterface' ) );
- $this->setLogger( 'baz', $this->getMock(
'\Psr\Log\LoggerInterface' ) );
+ $this->setLogger( 'foo', $this->getMock( LoggerInterface::class
) );
+ $this->setLogger( 'foo', $this->getMock( LoggerInterface::class
) );
$this->tearDown();
$logger2 = LoggerFactory::getInstance( 'baz' );
--
To view, visit https://gerrit.wikimedia.org/r/286429
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic9c24b813786bc4dc2d5aa48a17a958eef0a9ddb
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Addshore <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits