aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/content/JavaScriptContentHandlerIntegrationTest.php
diff options
context:
space:
mode:
authorTimo Tijhof <krinkle@fastmail.com>2024-07-21 19:16:16 +0100
committerKrinkle <krinkle@fastmail.com>2024-07-21 21:03:10 +0000
commit64734f61ee8d88ed437f5346ede4b1ac8f526e07 (patch)
tree61fb1b38ac4128a2a62b0555a8fa64d881b5f170 /tests/phpunit/includes/content/JavaScriptContentHandlerIntegrationTest.php
parent5348ef519ec972948e903e5c05f5a55549427b29 (diff)
downloadmediawikicore-64734f61ee8d88ed437f5346ede4b1ac8f526e07.tar.gz
mediawikicore-64734f61ee8d88ed437f5346ede4b1ac8f526e07.zip
content: Widen `@covers` tags in phpunit tests
https://gerrit.wikimedia.org/r/q/owner:Krinkle+is:merged+message:Widen > Given all called methods are de-facto and liberally claimed, and > that we keep the coverage limited to the subject class, it maintains > the spirit and intent by listing the class explicitly instead. > > PHPUnit offers a more precise tool when you need it (i.e. when testing > legacy monster/god classes), but for well-written code, the > class-wide tag is exactly what you want. > > We lose useful coverage and waste valuable time on keeping tags > accurate through refactors (or worse, forget to do so). > Tracking tiny per-method details wastes time in realizing (and > fixing) when people inevitably don't keep them in sync, and time > lost in finding uncovered code to write tests to realize it was > already covered but "not yet claimed". While at it, also fix PHPUnit warnings in CssContentHandlerIntegrationTest and JavaScriptContentHandlerIntegrationTest about not having any `@covers` annotations. Change-Id: I5afd9fe0bca0fa86cc096f6e5e79f2ba1cfbfa77
Diffstat (limited to 'tests/phpunit/includes/content/JavaScriptContentHandlerIntegrationTest.php')
-rw-r--r--tests/phpunit/includes/content/JavaScriptContentHandlerIntegrationTest.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/phpunit/includes/content/JavaScriptContentHandlerIntegrationTest.php b/tests/phpunit/includes/content/JavaScriptContentHandlerIntegrationTest.php
index 67cdd623a9ff..68a44275753c 100644
--- a/tests/phpunit/includes/content/JavaScriptContentHandlerIntegrationTest.php
+++ b/tests/phpunit/includes/content/JavaScriptContentHandlerIntegrationTest.php
@@ -4,6 +4,7 @@
* @group ContentHandler
* @group Database
* ^--- needed, because we do need the database to test link updates
+ * @covers \JavaScriptContentHandler
*/
class JavaScriptContentHandlerIntegrationTest extends TextContentHandlerIntegrationTest {
public static function provideGetParserOutput() {