Page MenuHomePhabricator

Add separate tests for PageEdit and increase the code coverage
Open, Needs TriagePublic

Description

The logic in the PageEdit class is currently covered by EditPageTest. This results in a coverage of ~85%. However, many edge cases and parts of the behaviour aren't technically covered by tests/assertions.
Some parts of PageEdit::doEdit should be split up into smaller methods that are easier to test, and there should be tests testing the full logic that don't rely on EditPage, as PageEdit will be used outside of EditPage as well in the future.

Event Timeline

Change #1297226 had a related patch set uploaded (by SomeRandomDeveloper; author: SomeRandomDeveloper):

[mediawiki/core@master] PageEdit: Split hasConflict() out of doEdit() and add tests for it

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

Change #1297226 merged by jenkins-bot:

[mediawiki/core@master] PageEdit: Split hasConflict() out of doEdit() and add tests for it

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