Merge "Add $digitTransformTable for the Manipuri language"
[lhc/web/wiklou.git] / tests / phpunit / includes / Storage / DerivedPageDataUpdaterTest.php
index 3b3e741..2148411 100644 (file)
@@ -945,6 +945,21 @@ class DerivedPageDataUpdaterTest extends MediaWikiTestCase {
                self::assertSame( $isCountable, $updater->isCountable() );
        }
 
+       /**
+        * @throws \MWException
+        * @covers \MediaWiki\Storage\DerivedPageDataUpdater::isCountable
+        */
+       public function testIsCountableNoModifiedSlots() {
+               $page = $this->getPage( __METHOD__ );
+               $content = [ 'main' => new WikitextContent( '[[Test]]' ) ];
+               $rev = $this->createRevision( $page, 'first', $content );
+               $nullRevision = MutableRevisionRecord::newFromParentRevision( $rev );
+               $nullRevision->setId( 14 );
+               $updater = $this->getDerivedPageDataUpdater( $page, $nullRevision );
+               $updater->prepareUpdate( $nullRevision );
+               $this->assertTrue( $updater->isCountable() );
+       }
+
        /**
         * @covers \MediaWiki\Storage\DerivedPageDataUpdater::doUpdates()
         * @covers \MediaWiki\Storage\DerivedPageDataUpdater::doSecondaryDataUpdates()