With PHPUnit 9, tests without @covers tags are considered risky and emit
warnings. Not having @covers is bad practice anyway, so use
@coversNothing instead to make the intention clear, and re-enable the
phpcs rule.
Also rewrite an assertion in ResourcesTest that was bothering me.
Bug: T243600
Change-Id: I6dd683f93b6b2faed5f107be2ca7860602277fbc
@covers does not make any sense for structure tests, which either
do not cover any PHP lines (they test things like configuration or
messages), or cover lines which cannot be determined at the time
of writing the tests (e.g. they cover all classes implementing a
certain interface). Requiring @coversNothing to be manually added
for all of them is a waste of developer time.
tests/phpunit/suite.xml has forceCoversAnnotation=true so removing
the annotations will not change test coverage, these files will
still be skipped.
Change-Id: I27cb58e92341b9b1a76f109701f5bc843adbaa9b
Structure tests run for extensions as well, which this test should. All
user rights should have right-* messages for display in the interface.
Bug: T143156
Change-Id: I23b8eb66bc68121b2ae17e73e705acd3e6f2d053
- Removed space after casts
- Removed spaces in array index
- Added spaces around string concat
- Added space after words: switch, foreach
- else if -> elseif
- Removed parentheses around require_once, because it is not a function
- Added newline at end of file
- Removed double spaces
- Added spaces around operations
- Removed repeated newlines
Bug: T102609
Change-Id: Ib860222b24f8ad8e9062cd4dc42ec88dc63fb49e
This change has not been advertised and cause random extensions
to start failing giving little clue to users.
Please have this change discussed on wikitech-l and announced
ahead of time to minimize disruptions. It brokes MathSearch at least:
https://gerrit.wikimedia.org/r/#/c/189442/
This reverts commit d333cd8f7b.
Change-Id: If9a28b1386fca946d8ba351c16134cdf7da8a148
Because extensions often don't add their rights to $wgAvailableRights
or via the 'UserGetAllRights' hook, thus User::getAllRights is incomplete.
Change-Id: Id9ae9eff71e822ec5c038c1c1f990ac36f05cea8