.pipeline/config.yaml: rename dev stage to publish
[lhc/web/wiklou.git] / tests / phpunit / includes / page / PageArchivePreMcrTest.php
index f8d4ef9..4c95579 100644 (file)
@@ -1,4 +1,5 @@
 <?php
+
 use MediaWiki\MediaWikiServices;
 use MediaWiki\Revision\SlotRecord;
 use MediaWiki\Storage\SqlBlobStore;
@@ -18,24 +19,6 @@ class PageArchivePreMcrTest extends PageArchiveTestBase {
 
        use PreMcrSchemaOverride;
 
-       /**
-        * @covers PageArchive::getTextFromRow
-        */
-       public function testGetTextFromRow() {
-               $this->hideDeprecated( PageArchive::class . '::getTextFromRow' );
-
-               /** @var SqlBlobStore $blobStore */
-               $blobStore = MediaWikiServices::getInstance()->getBlobStore();
-
-               $textId = $blobStore->getTextIdFromAddress(
-                       $this->firstRev->getSlot( SlotRecord::MAIN )->getAddress()
-               );
-
-               $row = (object)[ 'ar_text_id' => $textId ];
-               $text = $this->archivedPage->getTextFromRow( $row );
-               $this->assertSame( 'testing', $text );
-       }
-
        protected function getExpectedArchiveRows() {
                /** @var SqlBlobStore $blobStore */
                $blobStore = MediaWikiServices::getInstance()->getBlobStore();
@@ -43,9 +26,9 @@ class PageArchivePreMcrTest extends PageArchiveTestBase {
                return [
                        [
                                'ar_minor_edit' => '0',
-                               'ar_user' => '0',
+                               'ar_user' => null,
                                'ar_user_text' => $this->ipEditor,
-                               'ar_actor' => null,
+                               'ar_actor' => (string)User::newFromName( $this->ipEditor, false )->getActorId( $this->db ),
                                'ar_len' => '11',
                                'ar_deleted' => '0',
                                'ar_rev_id' => strval( $this->ipRev->getId() ),
@@ -70,7 +53,7 @@ class PageArchivePreMcrTest extends PageArchiveTestBase {
                                'ar_minor_edit' => '0',
                                'ar_user' => (string)$this->getTestUser()->getUser()->getId(),
                                'ar_user_text' => $this->getTestUser()->getUser()->getName(),
-                               'ar_actor' => null,
+                               'ar_actor' => (string)$this->getTestUser()->getUser()->getActorId(),
                                'ar_len' => '7',
                                'ar_deleted' => '0',
                                'ar_rev_id' => strval( $this->firstRev->getId() ),