Page MenuHomePhabricator

Improve test coverage for Revision class
Closed, ResolvedPublic

Description

These methods definitely need explicit test coverage:

Not quite as important, but should also be tested:

The following methods get tested only indirectly. This means that when they turn
into proxies for the new code, we don't know if they still do the right thing:

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

Restricted Application added a project: User-Addshore. · View Herald TranscriptNov 10 2017, 10:55 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 390399 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/core@master] Tests for Revision::decompressRevisionText

https://gerrit.wikimedia.org/r/390399

Addshore updated the task description. (Show Details)Nov 10 2017, 1:14 PM

Change 390405 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/core@master] Make Revision::testIsUnpatrolled more reliable

https://gerrit.wikimedia.org/r/390405

Addshore updated the task description. (Show Details)Nov 10 2017, 1:58 PM

Change 390405 merged by jenkins-bot:
[mediawiki/core@master] Make Revision::testIsUnpatrolled more reliable

https://gerrit.wikimedia.org/r/390405

Change 390399 merged by jenkins-bot:
[mediawiki/core@master] Tests for Revision::decompressRevisionText

https://gerrit.wikimedia.org/r/390399

OOh, this is moving quickly! Thank you, guys!

Change 390412 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/core@master] Test for Revision::newKnownCurrent

https://gerrit.wikimedia.org/r/390412

Addshore updated the task description. (Show Details)Nov 10 2017, 2:38 PM

When all the tests have been added, please rebase https://gerrit.wikimedia.org/r/#/c/375050/ to see whether the tests still pass.

Change 390424 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/core@master] Tests for Revision::userCanBitfield

https://gerrit.wikimedia.org/r/390424

Addshore updated the task description. (Show Details)Nov 10 2017, 3:50 PM

Change 390425 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/core@master] Tests for Revision::userCan

https://gerrit.wikimedia.org/r/390425

Addshore updated the task description. (Show Details)Nov 10 2017, 3:56 PM
Addshore updated the task description. (Show Details)Nov 13 2017, 8:27 PM
Addshore updated the task description. (Show Details)Nov 13 2017, 8:31 PM

Change 391183 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/core@master] Initial tests for Revision::getRevisionText

https://gerrit.wikimedia.org/r/391183

Addshore updated the task description. (Show Details)Nov 14 2017, 11:05 AM

Change 391192 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/core@master] Tests for Revision::getRevisionText with ExternalStore usage

https://gerrit.wikimedia.org/r/391192

Addshore updated the task description. (Show Details)Nov 14 2017, 12:04 PM
Addshore updated the task description. (Show Details)Nov 14 2017, 12:15 PM

Change 390412 merged by jenkins-bot:
[mediawiki/core@master] Test for Revision::newKnownCurrent

https://gerrit.wikimedia.org/r/390412

Change 390424 merged by jenkins-bot:
[mediawiki/core@master] Tests for Revision::userCanBitfield

https://gerrit.wikimedia.org/r/390424

Change 390425 merged by jenkins-bot:
[mediawiki/core@master] Tests for Revision::userCan

https://gerrit.wikimedia.org/r/390425

Addshore updated the task description. (Show Details)Nov 14 2017, 1:27 PM

Change 391183 merged by jenkins-bot:
[mediawiki/core@master] Initial tests for Revision::getRevisionText

https://gerrit.wikimedia.org/r/391183

Change 391192 merged by jenkins-bot:
[mediawiki/core@master] Tests for Revision::getRevisionText with ExternalStore usage

https://gerrit.wikimedia.org/r/391192

Change 391194 merged by jenkins-bot:
[mediawiki/core@master] Test for Revision::getRecentChange

https://gerrit.wikimedia.org/r/391194

Addshore updated the task description. (Show Details)Nov 14 2017, 6:47 PM
Addshore updated the task description. (Show Details)Nov 14 2017, 6:50 PM

Change 391534 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/core@master] Revision::userCanBitfield test fallback to $wgUser

https://gerrit.wikimedia.org/r/391534

Addshore updated the task description. (Show Details)Nov 15 2017, 11:27 AM

@daniel I had written tests for the query related methods already, but they were removed in https://gerrit.wikimedia.org/r/#/c/383918/ with no replacements. Shall I write them again or?

@Addshore I guess the tests were removed because the methods are now deprecated, and wfDeprecated makes tests fail.

I think that it's proper to keep testing deprecated methods. You can use setWgGlobals( 'wgDevelopmentWarnings' ) to allow the tests to execute. I suppose we should have a convenience method for that...

Change 391534 merged by jenkins-bot:
[mediawiki/core@master] Revision::userCanBitfield test fallback to $wgUser

https://gerrit.wikimedia.org/r/391534

Addshore updated the task description. (Show Details)Nov 18 2017, 5:45 PM

Change 392208 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/core@master] [MCR] Readd various field & cond method tests for Revision

https://gerrit.wikimedia.org/r/392208

Change 392214 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/core@master] [MCR] tests for Revision::getArchiveQueryInfo

https://gerrit.wikimedia.org/r/392214

Change 392215 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/core@master] [MCR] tests for Revision::getQueryInfo

https://gerrit.wikimedia.org/r/392215

Addshore updated the task description. (Show Details)Nov 18 2017, 6:23 PM

Change 392208 merged by jenkins-bot:
[mediawiki/core@master] [MCR] Readd various field & cond method tests for Revision

https://gerrit.wikimedia.org/r/392208

Change 392214 merged by jenkins-bot:
[mediawiki/core@master] [MCR] tests for Revision::getArchiveQueryInfo

https://gerrit.wikimedia.org/r/392214

Change 392215 merged by jenkins-bot:
[mediawiki/core@master] [MCR] tests for Revision::getQueryInfo

https://gerrit.wikimedia.org/r/392215

Addshore updated the task description. (Show Details)Nov 20 2017, 3:38 PM
Addshore renamed this task from Test coverage for Revision class to Improve test coverage for Revision class.Nov 20 2017, 7:29 PM
Addshore moved this task from Inbox to Next on the Multi-Content-Revisions board.

Change 392484 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/core@master] More user related Revision construction test cases

https://gerrit.wikimedia.org/r/392484

Addshore updated the task description. (Show Details)Nov 22 2017, 11:01 PM

Change 392484 merged by jenkins-bot:
[mediawiki/core@master] More user related Revision construction test cases

https://gerrit.wikimedia.org/r/392484

Addshore closed this task as Resolved.Dec 4 2017, 6:24 PM

I'd consider this improved...