Page MenuHomePhabricator

[Epic] Improve PHPUnit coverage in MobileFrontend to 50%
Open, MediumPublic

Description

MobileFrontend's PHP code coverage is currently very low (at time of writing this ticket, it is 27% (and low!)

See:
https://doc.wikimedia.org/cover-extensions/MobileFrontend/

We would like to improve things here, with a target of at least 50% as a starting point.

Suggested focus errors

  • Remove redundant code
  • write tests for the Amc folder
  • write tests for the specials folder (not for Specialnearby as that will soon be removed)
  • write tests for MobileFrontendHooks.php

Related Objects

StatusSubtypeAssignedTask
OpenNone
ResolvedJdlrobson
OpenNone
DeclinedNone
DuplicateNone
Resolvednray
Resolvedphuedx
ResolvedAnomie
ResolvedAnomie
ResolvedAnomie
ResolvedEBernhardson
ResolvedAnomie
ResolvedAnomie
OpenNone
DuplicateNone
ResolvedNone
Resolvedphuedx
DeclinedNone
OpenNone
Resolvedphuedx
Resolvedphuedx
DeclinedNone
OpenSpikeNone
OpenNone
ResolvedAmmarpad
ResolvedxSavitar
ResolvedxSavitar
ResolvedxSavitar
ResolvedxSavitar
Resolved pmiazga
OpenNone
ResolvedxSavitar
ResolvedNone
ResolvedxSavitar
ResolvedNone
Resolvedphuedx
Resolved pmiazga
OpenNone
OpenSpikeovasileva
OpenNone
DeclinedNone
Opencscott
OpenNone
OpenNone
Invalid GWicke
Resolvedliangent
Resolvedthiemowmde
OpenNone
Resolvedcscott
Resolvedcscott
ResolvedElitre
Resolvedcscott
Resolvedcscott
Resolvedcscott
Resolvedcscott
Resolvedcscott
OpenNone
Resolvedcscott
OpenNone
OpenNone
OpenNone
OpenNone
DeclinedNone
ResolvedJdlrobson
ResolvedJdlrobson
DuplicateNone
DuplicateNone
ResolvedTgr
ResolvedAnomie
Resolvedtstarling
Resolvedcoren
ResolvedAnomie
DeclinedBUG REPORTNone
ResolvedAnomie
ResolvedEsanders
ResolvedEsanders
Resolvedssastry
ResolvedAnomie
ResolvedCKoerner_WMF
Resolvedjhsoby
ResolvedTgr
DeclinedTgr
Resolvedcoren
ResolvedAnomie
ResolvedTgr
DeclinedNone
Resolvedssastry
ResolvedTgr
ResolvedTgr
ResolvedTgr
ResolvedDeskana
ResolvedCKoerner_WMF
ResolvedWhatamidoing-WMF
ResolvedTgr
ResolvedTgr
ResolvedTgr
ResolvedUrbanecm
ResolvedTgr
ResolvedTacsipacsi
ResolvedTgr
ResolvedCKoerner_WMF
ResolvedJdlrobson
DeclinedNone
DeclinedNone
OpenNone
ResolvedAmmarpad
ResolvedJdlrobson
ResolvedKizule
ResolvedKizule
DuplicateBrandonXLF
ResolvedJdlrobson
ResolvedAmmarpad
ResolvedJdlrobson
ResolvedJdlrobson
ResolvedJdlrobson

Event Timeline

hey @pmiazga ! @D3r1ck01 has expressed a desire to help us improve our PHP code coverage as a way to learn more about unit testing. I've said I'd help provide guidance and code review. I'm guessing you would also be interested in doing this?

As a short term goal we'd seek 50% code coverage, then onwards to 70+.

@D3r1ck01 have you seen https://tools.wmflabs.org/coverme/?repo=Extension%3AMobileFrontend&type=all ? It gives a good idea of where your tests can have the most impact!

Jdlrobson triaged this task as Medium priority.Jan 11 2019, 12:54 AM

We are currently at 33% so getting close to the 50% mark. Do we have tasks to take this over the finish line? The Amc and specials folder would be a good place to start.

https://doc.wikimedia.org/cover-extensions/MobileFrontend/

Jdlrobson renamed this task from [Epic] Improve PHPUnit coverage in MobileFrontend to medium to [Epic] Improve PHPUnit coverage in MobileFrontend to 50%.Jan 21 2021, 9:20 PM
Jdlrobson added a project: patch-welcome.
Jdlrobson updated the task description. (Show Details)