Commit graph

6 commits

Author SHA1 Message Date
James D. Forrester
4ed5ca48b1 Follow-up 71ff05267: Stop writing to tablesUsed in tests, now unnecessary
Bug: T342301
Change-Id: I5ea01f7ee103570165261bde0965c5b65e04c369
2023-11-21 09:02:48 -05:00
Daimona Eaytoy
f83e611efa Make MediaWikiIntegrationTestCase::addCoreDBData a noop
The method should never be called directly, so make it throw an exception.
Nonetheless, mark it as deprecated and detect overrides in the
constructor, so that anyone who tries to override this method will see a
warning.

Fix the few tests that were relying on the existence of the test page.

Bug: T342428
Depends-On: Ic64ded5e2c0b59e7c888ece9566076058a125be4
Change-Id: I308617427309815062d54c14f3438cab31b08a73
2023-09-05 00:36:36 +00:00
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)