Page MenuHomePhabricator

PHPUnit shows author information in the group list
Open, Needs TriagePublic


Running php tests/phpunit/phpunit.php --list-groups gave me results that looked inaccurate, as shown below. With further investigation I learned that whenever the @group part of the class documentation is followed by the @author line, the author part is also incorrectly interpreted as a group name. For example, Bene* is listed below only because of these lines.

I am unsure if we should treat this as an upstream bug of PHPUnit or if we should treat this as a downstream error of our own in that @author is an alias for @group and should not be used in this way.

Using PHP 7.0.28-0ubuntu0.16.04.1
PHPUnit 4.8.36 by Sebastian Bergmann and contributors.

Available test group(s):
 - API
 - Action
 - Addshore
 - Amir E. Aharoni
 - Antoine Musso
 - AuthManager
 - BagOStuff
 - Bene* < >
 - Blocking
 - Broken
 - CSSMin
 - Cache

Event Timeline

Huji created this task.Mar 28 2018, 2:48 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 28 2018, 2:48 AM
Huji updated the task description. (Show Details)Mar 28 2018, 2:49 AM

I can also see someone closing this as Invalid because they think using @author in this way is okay. I, on the other hand, think that unit tests should not be grouped by author, but rather by their functionality.

The @author annotation is an alias for the @group annotation (see the section called “@group”) and allows to filter tests based on their authors.

Krinkle moved this task from Inbox to PHPUnit on the MediaWiki-Core-Testing board.Apr 6 2018, 2:27 AM