Page MenuHomePhabricator

PHPUnit: Cover all model/MobileCollection class methods
Closed, ResolvedPublic

Description

The class in model/MobileCollection.php file has no code coverage. Tests should be written to fix this.

Acceptance criteria

  • Write unit tests to cover all methods in /models/MobileCollection.php.
  • Code coverage report has gone up.

Event Timeline

Jdlrobson triaged this task as Medium priority.Nov 7 2018, 9:45 PM
Jdlrobson moved this task from Incoming to Triaged but Future on the Readers-Web-Backlog board.

Change 472341 had a related patch set uploaded (by D3r1ck01; owner: Alangi Derick):
[mediawiki/extensions/MobileFrontend@master] Add MobileCollectionTest for MobileCollection::class

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

Change 472427 had a related patch set uploaded (by D3r1ck01; owner: Alangi Derick):
[mediawiki/extensions/MobileFrontend@master] Add MobilePageTest to test MobilePage::class

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

Change 472341 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Add MobileCollectionTest for MobileCollection::class

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

Change 473454 had a related patch set uploaded (by D3r1ck01; owner: Alangi Derick):
[mediawiki/extensions/MobileFrontend@master] Fix $expected and $actual values in MobileCollectionTest

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

xSavitar renamed this task from PHPUnit: Cover all model/* class methods to PHPUnit: Cover all model/MobileCollection class methods.Nov 14 2018, 11:52 AM
xSavitar updated the task description. (Show Details)

I've separated this task and here is the other half: T209476. Once the patches here are merged, this can be resolved. Would want to tackle these tasks in smaller bits :)

Change 473454 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Fix $expected and $actual values in MobileCollectionTest

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

I separated the task, so that now is tracked here: T209476. See: T208987#4745948.

phuedx added a subscriber: phuedx.
+-----------------------------+-------+--------+
| Filename                    | Old % | New %  |
+-----------------------------+-------+--------+
| models/MobileCollection.php | 0     | 100.00 |
+-----------------------------+-------+--------+

🎉🎉🎉

Change 472427 had a related patch set uploaded (by D3r1ck01; owner: Alangi Derick):
[mediawiki/extensions/MobileFrontend@master] Add MobilePageTest to test MobilePage::class

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

Ops, wrong ticket reference :(