Commit graph

4 commits

Author SHA1 Message Date
Daimona Eaytoy
1c60cafab4 Add @coversNothing to all structure tests
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
2022-10-07 03:21:54 +02:00
Derick Alangi
d01e3ed739 Replace deprecated calls ParserOptions::newCanonical( 'canonical' )
This is a quick find & replace of calls to the deprecated method
ParserOptions::newCanonical() when the context is the string literal
'canonical'. This can be safely replaced by called newFromAnon().

Change-Id: If7bb68459b11e0c5f5de188f10fdae85ad1a78bf
2022-06-16 14:22:24 +01:00
Kosta Harlan
ff63886b0f
phpunit: Do not access MW services in dataProviders
We cannot access MW services in a data provider, as MW will not have
bootstrapped by this point in plain PHPUnit. And we do not want to
bootstrap MW by the time a dataProvider is executing, because unit tests
should not need (nor be able to access) MW services.

Change-Id: I21a5993f91b8fbe3fa476a8244b8911cf81e1d5f
2022-05-30 23:16:06 +02:00
James D. Forrester
cee1271bfb tests: Rename ContentHandlerSanityTest to ContentHandlerFunctionalTest
Bug: T296157
Change-Id: Ia884137843e0c3c5d28adb3fe4da802a3907f2a5
2021-11-22 10:54:41 +00:00
Renamed from tests/phpunit/structure/ContentHandlerSanityTest.php (Browse further)