X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fpage%2FPageArchivePreMcrTest.php;h=4c955796f883dee61e6fe3e6eb1196bc8ac6c8f0;hb=1a76004e99e9994261b31bc2c1076346cdc2059c;hp=f8d4ef9bf1793d902b9588aae1e43cd788c2529a;hpb=be33fee8260d8aae2aa58e485463b25064f94ecb;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/page/PageArchivePreMcrTest.php b/tests/phpunit/includes/page/PageArchivePreMcrTest.php index f8d4ef9bf1..4c955796f8 100644 --- a/tests/phpunit/includes/page/PageArchivePreMcrTest.php +++ b/tests/phpunit/includes/page/PageArchivePreMcrTest.php @@ -1,4 +1,5 @@ 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() ),