Page MenuHomePhabricator

Make PHPUnit dataProvider static in Flow tests
Closed, ResolvedPublic

Description

The @dataProvider annotation should be a static function, check and make data provider in the extension, at least:

  • RevisionFormatterTest with decideContentFormatProvider, decideContentInvalidFormatProvider and setContentFormatInvalidProvider
  • PagerTest with provideDataMakePagingLink

static and adjust the usages (More infos at T332865).

Initial work was done in 2b47703615174730e5cae98a00fc7a41c3909ebc

Details

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Tgr subscribed.

Probably not worth putting much effort into Flow tech debt reduction (see T332022: [Epic] Undeploying StructuredDiscussions (Flow)).

Change #1143173 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/extensions/Flow@master] tests: Make PHPUnit data provider static

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

Change #1143173 merged by jenkins-bot:

[mediawiki/extensions/Flow@master] tests: Make PHPUnit data provider static

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