wiki.techinc.nl/tests/phpunit/includes/specials
Daimona Eaytoy 61354c9f40 phpunit: Add temporary overrides for assertObject(Not)HasAttribute
assertObjectHasAttribute and assertObjectNotHasAttribute are amongst the
assertion methods deprecated in PHPUnit 9.6. PHPUnit 10 introduced
replacement methods for them, assertObjectHasProperty and
assertObjectNotHasProperty respectively, but these weren't backported to
the 9.x branch.

Add temporary overrides for those methods in MediaWikiTestCaseTrait, so
that we can start migrating our code before the PHPUnit 10 update. The
signature, implementation, and error messages of these assertions are
copied from upstream, so the transition should be seamless. The only
tiny difference is that our version also prints "Failed asserting that
false is true" (and vice versa for NotHasAttribute) after the custom
message, but I don't think this is worth the complexity of adding a
custom Constraint.

Also migrate the few existing usages to the new methods.

Bug: T342110
Change-Id: If489d2c70fabbed6a068ef22d166f6e73f6adf6d
2023-08-20 00:22:24 +02:00
..
Contribute Fix whitespaces after comma 2022-12-15 01:24:14 +01:00
pagers phpunit: Add temporary overrides for assertObject(Not)HasAttribute 2023-08-20 00:22:24 +02:00
ContribsPagerTest.php Specials: Mass switch everything to IConnectionProvider from LB 2023-04-19 19:19:16 +02:00
DeletedContribsPagerTest.php Do not use UTSysop directly in tests 2023-08-16 00:35:25 +00:00
ImageListPagerTest.php Specials: Mass switch everything to IConnectionProvider from LB 2023-04-19 19:19:16 +02:00
QueryAllSpecialPagesTest.php Tests: Only skip tests related to the temp table reopen issue in MySQL 2023-06-09 02:31:03 +02:00
SpecialBlankPageTest.php phpunit: Update @covers annotations for namespaced classes 2023-05-27 17:43:12 +08:00
SpecialBlockTest.php phpunit: Update @covers annotations for namespaced classes 2023-05-27 17:43:12 +08:00
SpecialBooksourcesTest.php Fix DB usage in non-database tests 2023-07-21 13:52:47 +02:00
SpecialConfirmEmailTest.php tests: Avoid database usage when possible 2023-07-31 00:46:13 +00:00
SpecialContributeTest.php phpunit: Update @covers annotations for namespaced classes 2023-05-27 17:43:12 +08:00
SpecialContributionsTest.php phpunit: Update @covers annotations for namespaced classes 2023-05-27 17:43:12 +08:00
SpecialCreateAccountTest.php phpunit: Update @covers annotations for namespaced classes 2023-05-27 17:43:12 +08:00
SpecialEditWatchlistTest.php phpunit: Update @covers annotations for namespaced classes 2023-05-27 17:43:12 +08:00
SpecialGoToInterwikiTest.php Namespace SpecialGoToInterwiki under \MediaWiki\Specials 2023-05-03 20:02:49 +00:00
SpecialLogTest.php SpecialLogTest: Test getting full suppression log 2023-06-16 11:11:26 +02:00
SpecialMIMESearchTest.php phpunit: Update @covers annotations for namespaced classes 2023-05-27 17:43:12 +08:00
SpecialMuteTest.php tests: Avoid database usage when possible 2023-07-31 00:46:13 +00:00
SpecialMyLanguageTest.php Do not use UTPage directly in tests 2023-08-12 23:51:53 +02:00
SpecialPageDataTest.php Fix some PHPStorm inspections (#1) 2023-03-25 00:19:33 +00:00
SpecialPageExecutor.php Refactor SpecialPreferencesTest 2023-07-19 01:28:30 +02:00
SpecialPageTestBase.php Refactor SpecialPreferencesTest 2023-07-19 01:28:30 +02:00
SpecialPasswordResetTest.php phpunit: use ->getServiceContainer() in integration tests 2022-01-27 22:04:16 +01:00
SpecialPreferencesTest.php Refactor SpecialPreferencesTest 2023-07-19 01:28:30 +02:00
SpecialRecentchangesTest.php tests: Migrate Database::select usages to SelectQueryBuilder 2023-07-17 14:24:30 +02:00
SpecialRedirectTest.php build: Updating mediawiki/mediawiki-codesniffer to 41.0.0 2023-03-11 19:04:09 +00:00
SpecialRenameuserTest.php specials: Reject temp users on Special:Renameuser 2023-04-30 17:51:08 +02:00
SpecialSearchTest.php Do not use UTSysop directly in tests 2023-08-16 00:35:25 +00:00
SpecialSearchTestMockResultSet.php search: Make TitleMatcher a MediaWiki service object 2023-02-03 12:35:14 +00:00
SpecialShortPagesTest.php Specials: Mass switch everything to IConnectionProvider from LB 2023-04-19 19:19:16 +02:00
SpecialUnblockTest.php tests: Make some PHPUnit data providers static 2023-03-24 02:53:57 +00:00
SpecialUncategorizedCategoriesTest.php tests: Avoid database usage when possible 2023-07-31 00:46:13 +00:00
SpecialUploadTest.php tests: Make some PHPUnit data providers static 2023-03-24 02:53:57 +00:00
SpecialUserLogoutTest.php Fix DB usage in non-database tests 2023-07-21 13:52:47 +02:00
SpecialUserRightsTest.php tests: Add basic test for SpecialUserRights 2023-05-27 00:59:54 +02:00
SpecialWatchlistTest.php HookContainer: deprecate old hook handler formats 2023-06-21 11:40:10 +00:00