Legoktm has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/398416 )
Change subject: Fix @covers tags to use absolute class names in Storage tests
......................................................................
Fix @covers tags to use absolute class names in Storage tests
PHPUnit doesn't support use statements when evaluating @covers tags.
Change-Id: I7f649afd3e417a6b71b2f61c6ff59be5f404be8f
---
M tests/phpunit/includes/Storage/RevisionSlotsTest.php
M tests/phpunit/includes/Storage/RevisionStoreDbTest.php
M tests/phpunit/includes/Storage/RevisionStoreRecordTest.php
M tests/phpunit/includes/Storage/SqlBlobStoreTest.php
4 files changed, 55 insertions(+), 55 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/16/398416/1
diff --git a/tests/phpunit/includes/Storage/RevisionSlotsTest.php
b/tests/phpunit/includes/Storage/RevisionSlotsTest.php
index 288bf47..4dfae4b 100644
--- a/tests/phpunit/includes/Storage/RevisionSlotsTest.php
+++ b/tests/phpunit/includes/Storage/RevisionSlotsTest.php
@@ -11,7 +11,7 @@
class RevisionSlotsTest extends MediaWikiTestCase {
/**
- * @covers RevisionSlots::getSlot
+ * @covers \MediaWiki\Storage\RevisionSlots::getSlot
*/
public function testGetSlot() {
$mainSlot = SlotRecord::newUnsaved( 'main', new
WikitextContent( 'A' ) );
@@ -25,7 +25,7 @@
}
/**
- * @covers RevisionSlots::getContent
+ * @covers \MediaWiki\Storage\RevisionSlots::getContent
*/
public function testGetContent() {
$mainContent = new WikitextContent( 'A' );
@@ -41,7 +41,7 @@
}
/**
- * @covers RevisionSlots::getSlotRoles
+ * @covers \MediaWiki\Storage\RevisionSlots::getSlotRoles
*/
public function testGetSlotRoles_someSlots() {
$mainSlot = SlotRecord::newUnsaved( 'main', new
WikitextContent( 'A' ) );
@@ -52,7 +52,7 @@
}
/**
- * @covers RevisionSlots::getSlotRoles
+ * @covers \MediaWiki\Storage\RevisionSlots::getSlotRoles
*/
public function testGetSlotRoles_noSlots() {
$slots = new RevisionSlots( [] );
@@ -61,7 +61,7 @@
}
/**
- * @covers RevisionSlots::getSlots
+ * @covers \MediaWiki\Storage\RevisionSlots::getSlots
*/
public function testGetSlots() {
$mainSlot = SlotRecord::newUnsaved( 'main', new
WikitextContent( 'A' ) );
@@ -80,7 +80,7 @@
/**
* @dataProvider provideComputeSize
- * @covers RevisionSlots::computeSize
+ * @covers \MediaWiki\Storage\RevisionSlots::computeSize
*/
public function testComputeSize( $expected, $contentStrings ) {
$slotsArray = [];
@@ -100,7 +100,7 @@
/**
* @dataProvider provideComputeSha1
- * @covers RevisionSlots::computeSha1
+ * @covers \MediaWiki\Storage\RevisionSlots::computeSha1
* @note this test is a bit brittle as the hashes are hardcoded,
perhaps just check that strings
* are returned and different Slots objects return different
strings?
*/
diff --git a/tests/phpunit/includes/Storage/RevisionStoreDbTest.php
b/tests/phpunit/includes/Storage/RevisionStoreDbTest.php
index 69a50e2..695a6b3 100644
--- a/tests/phpunit/includes/Storage/RevisionStoreDbTest.php
+++ b/tests/phpunit/includes/Storage/RevisionStoreDbTest.php
@@ -125,7 +125,7 @@
/**
* @dataProvider provideInsertRevisionOn_successes
- * @covers RevisionStore::insertRevisionOn
+ * @covers \MediaWiki\Storage\RevisionStore::insertRevisionOn
*/
public function testInsertRevisionOn_successes( Title $title, array
$revDetails = [] ) {
$rev = $this->getRevisionRecordFromDetailsArray( $title,
$revDetails );
@@ -138,7 +138,7 @@
}
/**
- * @covers RevisionStore::insertRevisionOn
+ * @covers \MediaWiki\Storage\RevisionStore::insertRevisionOn
*/
public function testInsertRevisionOn_blobAddressExists() {
$title = Title::newFromText( 'UTPage' );
@@ -228,7 +228,7 @@
/**
* @dataProvider provideInsertRevisionOn_failures
- * @covers RevisionStore::insertRevisionOn
+ * @covers \MediaWiki\Storage\RevisionStore::insertRevisionOn
*/
public function testInsertRevisionOn_failures(
Title $title,
@@ -261,7 +261,7 @@
/**
* @dataProvider provideNewNullRevision
- * @covers RevisionStore::newNullRevision
+ * @covers \MediaWiki\Storage\RevisionStore::newNullRevision
*/
public function testNewNullRevision( Title $title, $comment, $minor ) {
$store = MediaWikiServices::getInstance()->getRevisionStore();
@@ -282,7 +282,7 @@
}
/**
- * @covers RevisionStore::newNullRevision
+ * @covers \MediaWiki\Storage\RevisionStore::newNullRevision
*/
public function testNewNullRevision_nonExistingTitle() {
$store = MediaWikiServices::getInstance()->getRevisionStore();
@@ -297,7 +297,7 @@
}
/**
- * @covers RevisionStore::isUnpatrolled
+ * @covers \MediaWiki\Storage\RevisionStore::isUnpatrolled
*/
public function testIsUnpatrolled_returnsRecentChangesId() {
$page = WikiPage::factory( Title::newFromText( 'UTPage' ) );
@@ -317,7 +317,7 @@
}
/**
- * @covers RevisionStore::isUnpatrolled
+ * @covers \MediaWiki\Storage\RevisionStore::isUnpatrolled
*/
public function testIsUnpatrolled_returnsZeroIfPatrolled() {
// This assumes that sysops are auto patrolled
@@ -356,7 +356,7 @@
}
/**
- * @covers RevisionStore::getRevisionById
+ * @covers \MediaWiki\Storage\RevisionStore::getRevisionById
*/
public function testGetRevisionById() {
$page = WikiPage::factory( Title::newFromText( 'UTPage' ) );
@@ -374,7 +374,7 @@
}
/**
- * @covers RevisionStore::getRevisionByTitle
+ * @covers \MediaWiki\Storage\RevisionStore::getRevisionByTitle
*/
public function testGetRevisionByTitle() {
$page = WikiPage::factory( Title::newFromText( 'UTPage' ) );
@@ -392,7 +392,7 @@
}
/**
- * @covers RevisionStore::getRevisionByPageId
+ * @covers \MediaWiki\Storage\RevisionStore::getRevisionByPageId
*/
public function testGetRevisionByPageId() {
$page = WikiPage::factory( Title::newFromText( 'UTPage' ) );
@@ -410,7 +410,7 @@
}
/**
- * @covers RevisionStore::getRevisionFromTimestamp
+ * @covers \MediaWiki\Storage\RevisionStore::getRevisionFromTimestamp
*/
public function testGetRevisionFromTimestamp() {
// Make sure there is 1 second between the last revision and
the rev we create...
@@ -493,8 +493,8 @@
}
/**
- * @covers RevisionStore::newRevisionFromRow
- * @covers RevisionStore::newRevisionFromRow_1_29
+ * @covers \MediaWiki\Storage\RevisionStore::newRevisionFromRow
+ * @covers \MediaWiki\Storage\RevisionStore::newRevisionFromRow_1_29
*/
public function testNewRevisionFromRow_anonEdit() {
$page = WikiPage::factory( Title::newFromText( 'UTPage' ) );
@@ -514,8 +514,8 @@
}
/**
- * @covers RevisionStore::newRevisionFromRow
- * @covers RevisionStore::newRevisionFromRow_1_29
+ * @covers \MediaWiki\Storage\RevisionStore::newRevisionFromRow
+ * @covers \MediaWiki\Storage\RevisionStore::newRevisionFromRow_1_29
*/
public function testNewRevisionFromRow_userEdit() {
$page = WikiPage::factory( Title::newFromText( 'UTPage' ) );
@@ -538,7 +538,7 @@
}
/**
- * @covers RevisionStore::newRevisionFromArchiveRow
+ * @covers \MediaWiki\Storage\RevisionStore::newRevisionFromArchiveRow
*/
public function testNewRevisionFromArchiveRow() {
$store = MediaWikiServices::getInstance()->getRevisionStore();
@@ -565,7 +565,7 @@
}
/**
- * @covers RevisionStore::loadRevisionFromId
+ * @covers \MediaWiki\Storage\RevisionStore::loadRevisionFromId
*/
public function testLoadRevisionFromId() {
$title = Title::newFromText( __METHOD__ );
@@ -580,7 +580,7 @@
}
/**
- * @covers RevisionStore::loadRevisionFromPageId
+ * @covers \MediaWiki\Storage\RevisionStore::loadRevisionFromPageId
*/
public function testLoadRevisionFromPageId() {
$title = Title::newFromText( __METHOD__ );
@@ -595,7 +595,7 @@
}
/**
- * @covers RevisionStore::loadRevisionFromTitle
+ * @covers \MediaWiki\Storage\RevisionStore::loadRevisionFromTitle
*/
public function testLoadRevisionFromTitle() {
$title = Title::newFromText( __METHOD__ );
@@ -610,7 +610,7 @@
}
/**
- * @covers RevisionStore::loadRevisionFromTimestamp
+ * @covers \MediaWiki\Storage\RevisionStore::loadRevisionFromTimestamp
*/
public function testLoadRevisionFromTimestamp() {
$title = Title::newFromText( __METHOD__ );
@@ -647,7 +647,7 @@
}
/**
- * @covers RevisionStore::listRevisionSizes
+ * @covers \MediaWiki\Storage\RevisionStore::listRevisionSizes
*/
public function testGetParentLengths() {
$page = WikiPage::factory( Title::newFromText( __METHOD__ ) );
@@ -683,7 +683,7 @@
}
/**
- * @covers RevisionStore::getPreviousRevision
+ * @covers \MediaWiki\Storage\RevisionStore::getPreviousRevision
*/
public function testGetPreviousRevision() {
$page = WikiPage::factory( Title::newFromText( __METHOD__ ) );
@@ -707,7 +707,7 @@
}
/**
- * @covers RevisionStore::getNextRevision
+ * @covers \MediaWiki\Storage\RevisionStore::getNextRevision
*/
public function testGetNextRevision() {
$page = WikiPage::factory( Title::newFromText( __METHOD__ ) );
@@ -731,7 +731,7 @@
}
/**
- * @covers RevisionStore::getTimestampFromId
+ * @covers \MediaWiki\Storage\RevisionStore::getTimestampFromId
*/
public function testGetTimestampFromId_found() {
$page = WikiPage::factory( Title::newFromText( 'UTPage' ) );
@@ -749,7 +749,7 @@
}
/**
- * @covers RevisionStore::getTimestampFromId
+ * @covers \MediaWiki\Storage\RevisionStore::getTimestampFromId
*/
public function testGetTimestampFromId_notFound() {
$page = WikiPage::factory( Title::newFromText( 'UTPage' ) );
@@ -767,7 +767,7 @@
}
/**
- * @covers RevisionStore::countRevisionsByPageId
+ * @covers \MediaWiki\Storage\RevisionStore::countRevisionsByPageId
*/
public function testCountRevisionsByPageId() {
$store = MediaWikiServices::getInstance()->getRevisionStore();
@@ -790,7 +790,7 @@
}
/**
- * @covers RevisionStore::countRevisionsByTitle
+ * @covers \MediaWiki\Storage\RevisionStore::countRevisionsByTitle
*/
public function testCountRevisionsByTitle() {
$store = MediaWikiServices::getInstance()->getRevisionStore();
@@ -813,7 +813,7 @@
}
/**
- * @covers RevisionStore::userWasLastToEdit
+ * @covers \MediaWiki\Storage\RevisionStore::userWasLastToEdit
*/
public function testUserWasLastToEdit_false() {
$sysop = $this->getTestSysop()->getUser();
@@ -831,7 +831,7 @@
}
/**
- * @covers RevisionStore::userWasLastToEdit
+ * @covers \MediaWiki\Storage\RevisionStore::userWasLastToEdit
*/
public function testUserWasLastToEdit_true() {
$startTime = wfTimestampNow();
@@ -856,7 +856,7 @@
}
/**
- * @covers RevisionStore::getKnownCurrentRevision
+ * @covers \MediaWiki\Storage\RevisionStore::getKnownCurrentRevision
*/
public function testGetKnownCurrentRevision() {
$page = WikiPage::factory( Title::newFromText( 'UTPage' ) );
@@ -951,7 +951,7 @@
/**
* @dataProvider provideNewMutableRevisionFromArray
- * @covers RevisionStore::newMutableRevisionFromArray
+ * @covers \MediaWiki\Storage\RevisionStore::newMutableRevisionFromArray
*/
public function testNewMutableRevisionFromArray( array $array ) {
$store = MediaWikiServices::getInstance()->getRevisionStore();
diff --git a/tests/phpunit/includes/Storage/RevisionStoreRecordTest.php
b/tests/phpunit/includes/Storage/RevisionStoreRecordTest.php
index e9f376c..db85727 100644
--- a/tests/phpunit/includes/Storage/RevisionStoreRecordTest.php
+++ b/tests/phpunit/includes/Storage/RevisionStoreRecordTest.php
@@ -658,7 +658,7 @@
/**
* @dataProvider provideUserCanBitfield
- * @covers RevisionRecord::userCanBitfield
+ * @covers \MediaWiki\Storage\RevisionRecord::userCanBitfield
*/
public function testUserCanBitfield( $bitField, $field, $userGroups,
$title, $expected ) {
$this->forceStandardPermissions();
@@ -744,7 +744,7 @@
/**
* @dataProvider provideHasSameContent
- * @covers RevisionRecord::hasSameContent
+ * @covers \MediaWiki\Storage\RevisionRecord::hasSameContent
* @group Database
*/
public function testHasSameContent(
@@ -802,7 +802,7 @@
/**
* @dataProvider provideIsDeleted
- * @covers RevisionRecord::isDeleted
+ * @covers \MediaWiki\Storage\RevisionRecord::isDeleted
*/
public function testIsDeleted( $revDeleted, $assertionMap ) {
$rev = $this->newRevision( [ 'rev_deleted' => $revDeleted ] );
diff --git a/tests/phpunit/includes/Storage/SqlBlobStoreTest.php
b/tests/phpunit/includes/Storage/SqlBlobStoreTest.php
index 12d8119..b6af2b4 100644
--- a/tests/phpunit/includes/Storage/SqlBlobStoreTest.php
+++ b/tests/phpunit/includes/Storage/SqlBlobStoreTest.php
@@ -37,8 +37,8 @@
}
/**
- * @covers SqlBlobStore::getCompressBlobs()
- * @covers SqlBlobStore::setCompressBlobs()
+ * @covers \MediaWiki\Storage\SqlBlobStore::getCompressBlobs()
+ * @covers \MediaWiki\Storage\SqlBlobStore::setCompressBlobs()
*/
public function testGetSetCompressRevisions() {
$store = $this->getBlobStore();
@@ -48,9 +48,9 @@
}
/**
- * @covers SqlBlobStore::getLegacyEncoding()
- * @covers SqlBlobStore::getLegacyEncodingConversionLang()
- * @covers SqlBlobStore::setLegacyEncoding()
+ * @covers \MediaWiki\Storage\SqlBlobStore::getLegacyEncoding()
+ * @covers
\MediaWiki\Storage\SqlBlobStore::getLegacyEncodingConversionLang()
+ * @covers \MediaWiki\Storage\SqlBlobStore::setLegacyEncoding()
*/
public function testGetSetLegacyEncoding() {
$store = $this->getBlobStore();
@@ -63,8 +63,8 @@
}
/**
- * @covers SqlBlobStore::getCacheExpiry()
- * @covers SqlBlobStore::setCacheExpiry()
+ * @covers \MediaWiki\Storage\SqlBlobStore::getCacheExpiry()
+ * @covers \MediaWiki\Storage\SqlBlobStore::setCacheExpiry()
*/
public function testGetSetCacheExpiry() {
$store = $this->getBlobStore();
@@ -74,8 +74,8 @@
}
/**
- * @covers SqlBlobStore::getUseExternalStore()
- * @covers SqlBlobStore::setUseExternalStore()
+ * @covers \MediaWiki\Storage\SqlBlobStore::getUseExternalStore()
+ * @covers \MediaWiki\Storage\SqlBlobStore::setUseExternalStore()
*/
public function testGetSetUseExternalStore() {
$store = $this->getBlobStore();
@@ -138,7 +138,7 @@
/**
* @dataProvider provideDecompress
- * @covers SqlBlobStore::decompressData
+ * @covers \MediaWiki\Storage\SqlBlobStore::decompressData
*
* @param string|bool $legacyEncoding
* @param mixed $data
@@ -154,7 +154,7 @@
}
/**
- * @covers SqlBlobStore::compressData
+ * @covers \MediaWiki\Storage\SqlBlobStore::compressData
*/
public function testCompressRevisionTextUtf8() {
$store = $this->getBlobStore();
@@ -170,7 +170,7 @@
}
/**
- * @covers SqlBlobStore::compressData
+ * @covers \MediaWiki\Storage\SqlBlobStore::compressData
*/
public function testCompressRevisionTextUtf8Gzip() {
$store = $this->getBlobStore( false, true );
@@ -194,8 +194,8 @@
/**
* @dataProvider provideBlobs
- * @covers SqlBlobStore::storeBlob
- * @covers SqlBlobStore::getBlob
+ * @covers \MediaWiki\Storage\SqlBlobStore::storeBlob
+ * @covers \MediaWiki\Storage\SqlBlobStore::getBlob
*/
public function testSimpleStoreGetBlobSimpleRoundtrip( $blob ) {
$store = $this->getBlobStore();
--
To view, visit https://gerrit.wikimedia.org/r/398416
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7f649afd3e417a6b71b2f61c6ff59be5f404be8f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits