Hello Daniel Kinzler, Addshore, jenkins-bot,
I'd like you to do a code review. Please visit
https://gerrit.wikimedia.org/r/392362
to review the following change.
Change subject: Revert "[MCR] Readd various field & cond method tests for
Revision"
......................................................................
Revert "[MCR] Readd various field & cond method tests for Revision"
These tests break if $wgCommentTableSchemaMigrationStage is not MIGRATION_OLD.
If you're going to re-add them, make sure they work regardless of this setting.
This reverts commit b2ff18b9ed04fb20dfbf5675c8a3884c704d13bc.
Change-Id: Iece09164d23089df0aba1ceef33cf1d6103bb52c
---
M tests/phpunit/includes/RevisionTest.php
1 file changed, 0 insertions(+), 179 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/62/392362/1
diff --git a/tests/phpunit/includes/RevisionTest.php
b/tests/phpunit/includes/RevisionTest.php
index a4f55d0..b7e410c 100644
--- a/tests/phpunit/includes/RevisionTest.php
+++ b/tests/phpunit/includes/RevisionTest.php
@@ -577,183 +577,4 @@
$this->assertSame( 'AAAABBAAA', $cache->get( $cacheKey ) );
}
- /**
- * @covers Revision::userJoinCond
- */
- public function testUserJoinCond() {
- $this->hideDeprecated( 'Revision::userJoinCond' );
- $this->assertEquals(
- [ 'LEFT JOIN', [ 'rev_user != 0', 'user_id = rev_user'
] ],
- Revision::userJoinCond()
- );
- }
-
- /**
- * @covers Revision::pageJoinCond
- */
- public function testPageJoinCond() {
- $this->hideDeprecated( 'Revision::pageJoinCond' );
- $this->assertEquals(
- [ 'INNER JOIN', [ 'page_id = rev_page' ] ],
- Revision::pageJoinCond()
- );
- }
-
- public function provideSelectFields() {
- yield [
- true,
- [
- 'rev_id',
- 'rev_page',
- 'rev_text_id',
- 'rev_timestamp',
- 'rev_user_text',
- 'rev_user',
- 'rev_minor_edit',
- 'rev_deleted',
- 'rev_len',
- 'rev_parent_id',
- 'rev_sha1',
- 'rev_comment_text' => 'rev_comment',
- 'rev_comment_data' => 'NULL',
- 'rev_comment_cid' => 'NULL',
- 'rev_content_format',
- 'rev_content_model',
- ]
- ];
- yield [
- false,
- [
- 'rev_id',
- 'rev_page',
- 'rev_text_id',
- 'rev_timestamp',
- 'rev_user_text',
- 'rev_user',
- 'rev_minor_edit',
- 'rev_deleted',
- 'rev_len',
- 'rev_parent_id',
- 'rev_sha1',
- 'rev_comment_text' => 'rev_comment',
- 'rev_comment_data' => 'NULL',
- 'rev_comment_cid' => 'NULL',
- ]
- ];
- }
-
- /**
- * @dataProvider provideSelectFields
- * @covers Revision::selectFields
- * @todo a true unit test would mock CommentStore
- */
- public function testSelectFields( $contentHandlerUseDB, $expected ) {
- $this->hideDeprecated( 'Revision::selectFields' );
- $this->setMwGlobals( 'wgContentHandlerUseDB',
$contentHandlerUseDB );
- $this->assertEquals( $expected, Revision::selectFields() );
- }
-
- public function provideSelectArchiveFields() {
- yield [
- true,
- [
- 'ar_id',
- 'ar_page_id',
- 'ar_rev_id',
- 'ar_text',
- 'ar_text_id',
- 'ar_timestamp',
- 'ar_user_text',
- 'ar_user',
- 'ar_minor_edit',
- 'ar_deleted',
- 'ar_len',
- 'ar_parent_id',
- 'ar_sha1',
- 'ar_comment_text' => 'ar_comment',
- 'ar_comment_data' => 'NULL',
- 'ar_comment_cid' => 'NULL',
- 'ar_content_format',
- 'ar_content_model',
- ]
- ];
- yield [
- false,
- [
- 'ar_id',
- 'ar_page_id',
- 'ar_rev_id',
- 'ar_text',
- 'ar_text_id',
- 'ar_timestamp',
- 'ar_user_text',
- 'ar_user',
- 'ar_minor_edit',
- 'ar_deleted',
- 'ar_len',
- 'ar_parent_id',
- 'ar_sha1',
- 'ar_comment_text' => 'ar_comment',
- 'ar_comment_data' => 'NULL',
- 'ar_comment_cid' => 'NULL',
- ]
- ];
- }
-
- /**
- * @dataProvider provideSelectArchiveFields
- * @covers Revision::selectArchiveFields
- * @todo a true unit test would mock CommentStore
- */
- public function testSelectArchiveFields( $contentHandlerUseDB,
$expected ) {
- $this->hideDeprecated( 'Revision::selectArchiveFields' );
- $this->setMwGlobals( 'wgContentHandlerUseDB',
$contentHandlerUseDB );
- $this->assertEquals( $expected, Revision::selectArchiveFields()
);
- }
-
- /**
- * @covers Revision::selectTextFields
- */
- public function testSelectTextFields() {
- $this->hideDeprecated( 'Revision::selectTextFields' );
- $this->assertEquals(
- [
- 'old_text',
- 'old_flags',
- ],
- Revision::selectTextFields()
- );
- }
-
- /**
- * @covers Revision::selectPageFields
- */
- public function testSelectPageFields() {
- $this->hideDeprecated( 'Revision::selectPageFields' );
- $this->assertEquals(
- [
- 'page_namespace',
- 'page_title',
- 'page_id',
- 'page_latest',
- 'page_is_redirect',
- 'page_len',
- ],
- Revision::selectPageFields()
- );
- }
-
- /**
- * @covers Revision::selectUserFields
- */
- public function testSelectUserFields() {
- $this->hideDeprecated( 'Revision::selectUserFields' );
- $this->assertEquals(
- [
- 'user_name',
- ],
- Revision::selectUserFields()
- );
- }
-
}
--
To view, visit https://gerrit.wikimedia.org/r/392362
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iece09164d23089df0aba1ceef33cf1d6103bb52c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Anomie <[email protected]>
Gerrit-Reviewer: Addshore <[email protected]>
Gerrit-Reviewer: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits