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

D3r1ck01 created this task.Nov 7 2018, 7:26 PM
Jdlrobson triaged this task as Normal priority.

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

D3r1ck01 claimed this task.Nov 7 2018, 10:24 PM
D3r1ck01 moved this task from Backlog to Doing [WIP] on the User-D3r1ck01 board.

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

D3r1ck01 updated the task description. (Show Details)Nov 9 2018, 9:28 PM
D3r1ck01 updated the task description. (Show Details)Nov 9 2018, 9:32 PM

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

D3r1ck01 renamed this task from PHPUnit: Cover all model/* class methods to PHPUnit: Cover all model/MobileCollection class methods.Nov 14 2018, 11:52 AM
D3r1ck01 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 :)

D3r1ck01 updated the task description. (Show Details)Nov 14 2018, 12:01 PM

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

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

https://gerrit.wikimedia.org/r/472427 i still open and has a -1? Should that be abandoned or is that still being done?

D3r1ck01 added a comment.EditedNov 14 2018, 6:19 PM

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

phuedx closed this task as Resolved.Nov 15 2018, 5:30 PM
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 :(