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.
StatusSubtypeAssignedTask
Resolveddaniel
ResolvedAddshore

Event Timeline

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

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

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

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

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

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

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

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

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

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

@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

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

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 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

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

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

I'd consider this improved...