Page MenuHomePhabricator

Write unit test for non-wikitext content
Open, Needs TriagePublic

Description

We discovered in T199504 that unit tests are lacking for a use case involving non-wikitext content. We expect that the tests should pass normally, but will fail once we locally reapply the "strict equality" patch from https://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/443964/ , at least that's one way to identify the code path that was affected.

Event Timeline

awight created this task.Aug 27 2018, 5:42 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 27 2018, 5:42 PM

The PHP unit tests don't reach edit() or showEditForm(), where the problematic code lies. Some light selenium tests are being run.

We could add to the selenium tests to edit non-wikitext content, or could create new PHP unit tests that mock the request and OutputPage.

Krinkle moved this task from Inbox to PHPUnit on the MediaWiki-Core-Testing board.Oct 5 2018, 8:20 PM