objectcache: add some WANObjectCache comments to set() and delete()
[lhc/web/wiklou.git] / tests / phpunit / tests / MediaWikiTestCaseTest.php
index a2ef35f..fb2957b 100644 (file)
@@ -2,15 +2,16 @@
 use MediaWiki\Logger\LoggerFactory;
 use MediaWiki\MediaWikiServices;
 use Psr\Log\LoggerInterface;
+use Wikimedia\Rdbms\LoadBalancer;
 
 /**
  * @covers MediaWikiTestCase
+ * @group MediaWikiTestCaseTest
+ *
  * @author Addshore
  */
 class MediaWikiTestCaseTest extends MediaWikiTestCase {
 
-       const GLOBAL_KEY_NONEXISTING = 'MediaWikiTestCaseTestGLOBAL-NONExisting';
-
        private static $startGlobals = [
                'MediaWikiTestCaseTestGLOBAL-ExistingString' => 'foo',
                'MediaWikiTestCaseTestGLOBAL-ExistingStringEmpty' => '',
@@ -140,11 +141,11 @@ class MediaWikiTestCaseTest extends MediaWikiTestCase {
 
        /**
         * @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' );
@@ -155,10 +156,10 @@ class MediaWikiTestCaseTest extends MediaWikiTestCase {
 
        /**
         * @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' );
@@ -169,12 +170,12 @@ class MediaWikiTestCaseTest extends MediaWikiTestCase {
 
        /**
         * @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' );