In preparation of refactoring WikiPage for Multi-Content-Revision support, we need to improve test coverage, so we don't break things.
Note that WikiPage is quite hard to test, since it covers multiple concerns, and triggers many asynchronous actions, generally via global state.
The main focus of this effort will for now be to fully test all code that leads to changes in the database, and ensuring that these changes are correct.
Coverage report: https://doc.wikimedia.org/cover/mediawiki-core/includes/page/WikiPage.php.html
Most important methods to test, in order of priority:
[] doEditContent - 68%
[] doDeleteArticleReal / doDeleteArticle (doDeleteArticle has 100%, doDeleteArticleReal has 0%, i smell a fish)
[] insertOn - 0%
[] updateRevisionOn - 0%
[] updateIfNewerOn - 0%
[] insertProtectNullRevision - 0%
[] doRollback / commitRollback 61% & 0% (fish smelt)
[] newFromId (must select the correct info from the correct row) - 0%
[] newFromRow - 0%
[] doUpdateRestrictions - 0%
[] insertRedirectEntry - 0%
[] updateRedirectOn - 0%
[] updateCategoryCounts - 0%
In all cases, the focus should be on making sure that the database is updated in the expected way. The database layer should not be mocked.