Commit graph

13 commits

Author SHA1 Message Date
jenkins-bot
7040be4f72 Merge "Revision: Handle all return values of Title::newFromId" 2018-01-01 00:05:25 +00:00
Sam Smith
011b458627 Revision: Handle all return values of Title::newFromId
In Revision::getKnownCurrent, fail early when Title::newFromId returns
null to avoid an uncatchable fatal error being triggered.

RevisionStore#getKnownCurrentRevision requires that the title parameter
be an instance of Title.

This follows on from Ia4c20a91.

Change-Id: I9bddafcc5df630d1dff1e2526194186cab7097e5
2017-12-31 20:44:18 +00:00
Kunal Mehta
0c77841534 Add @covers tags to miscellaneous tests
Change-Id: I7e65c1734aef01cd6395ee65204a0158d1635b0c
2017-12-24 23:29:00 -08:00
daniel
6af796f3e0 MCR: Deprecate and gut Revision class
This is a re-submission of I4f24e7fbb68.

As a first major step towards Multi-Content-Revisions (MCR),
this patch turns the Revision class into a legacy proxy for
the new RevisionRecord and RevisionStore classes.

Backwards compatibility is maintained for all but some
rare edge cases, like constructing a completely empty
Revision object.

For more information on MCR, see
<https://www.mediawiki.org/wiki/Requests_for_comment/Multi-Content_Revisions>.

NOTE: once this is merged, verify create/delete/restore cycle on beta,
      ideally with emulated replication lag.

Bug: T174025
Change-Id: Ia4c20a91e98df0b9b14b138eb4825c55e5200384
2017-12-21 18:08:54 +00:00
Daniel Kinzler
09bf4f5bb2 Revert "[MCR] Turn Revision into a proxy to new code."
This reverts commit 9dcc56b3c9.

With this patch applied, newly created revisions are sometimes not found
just after submitting an edit, until replicas have caught up.

Our best theory is that it somehow interfere with ChronologyProtector,
but we don't have a good idea how.

Also, as legoktm mentioned, the commit message is terrible and needs fixing.

Change-Id: Idf3404f3fa8f8d08a7fb2ab8268726e2c1edecfe
2017-12-19 12:38:48 +00:00
daniel
9dcc56b3c9 [MCR] Turn Revision into a proxy to new code.
Change-Id: I4f24e7fbb683cb51f3fd8b250732bae9c7541ba2
2017-12-18 14:37:29 +00:00
addshore
23ad9d1998 Convert timestamp from DB in RevisionDbTestBase::testInsertOn
Bug: T75174
Change-Id: Ia45eec0e072c794931ea7a415259602d03f4c31e
2017-11-30 14:49:17 +01:00
addshore
4a5da08ece Revision::userCanBitfield test fallback to $wgUser
Bug: T180210
Change-Id: Ibda256d6fdd8762e0e90748d71034979e2de106f
2017-11-17 18:24:03 +00:00
addshore
d2bfadf1ae Test for Revision::getRecentChange
Bug: T180210
Change-Id: I67a425676236af77063ad759f4515742533436ca
2017-11-14 18:38:03 +00:00
addshore
db13c66ff2 Tests for Revision::userCan
Bug: T180210
Change-Id: I22f214dab6cba856982c566462562a137181d9cc
2017-11-10 16:26:25 +00:00
addshore
392955def1 Tests for Revision::userCanBitfield
Bug: T180210
Change-Id: Idf7e9d0f05b967b2fc083e6a70e9411b53390ed7
2017-11-10 15:58:05 +00:00
addshore
ee78c151a1 Test for Revision::newKnownCurrent
Bug: T180210
Change-Id: I2cc83cbc91583b4631f4798dd14612c49024eeb4
2017-11-10 14:55:08 +00:00
addshore
aab3e3be88 Run RevisionIntegrationTest for both ContentHandlerUseDB settings
core used to have a test case that ran various Revision tests
with and without ContentHandlerUseDB set, however it did not
run due to the class / file having a bad name.

This patch reintroduces the running on Revision tests for both
ContentHandlerUseDB settings.

The global has to be set in setup / before the page used for
testing is created, else this page will be created with the
wrong values in the DB for use in the tests.

Change-Id: Ied1023e22eeac413fa86ea6946aa31619fd66319
2017-11-10 14:11:17 +00:00
Renamed from tests/phpunit/includes/RevisionIntegrationTest.php (Browse further)