wiki.techinc.nl/tests/phpunit/includes/api/query
Bartosz Dziewoński 1048db795b API tests: Assert error codes, not error messages
Error messages are not guaranteed to be stable, and these tests
prevent us from improving them.

Error codes are supposed to be stable, so we should be asserting
that they do not change (especially since many of them are
dynamically generated by the dodgy code in ApiMessageTrait).

Introduce helpers assertApiErrorCode() and expectApiErrorCode()
to be used instead of the usual PHPUnit assertions/expectations
for this case.

Change-Id: I752f82f29bf5f9405ea117ebf9e5cf70335464ad
2023-04-26 19:36:29 +02:00
..
ApiQueryAllPagesTest.php Reorg: Namespace the Title class 2023-03-02 08:46:53 -05:00
ApiQueryAllRevisionsTest.php tests/api: Add TestUser::getAuthority and use it 2022-08-06 23:15:27 +02:00
ApiQueryBasicTest.php tests: Use Title::makeTitle instead of Title::newFromText 2022-09-23 21:53:11 +02:00
ApiQueryBlockInfoTraitTest.php tests: Make some PHPUnit data providers static 2023-03-24 02:53:57 +00:00
ApiQueryBlocksTest.php Use short array destructuring instead of list() 2022-10-21 15:33:37 +11:00
ApiQueryContinue2Test.php Tests: Mark more closures as static 2021-02-07 13:26:56 +01:00
ApiQueryContinueTest.php Tests: Mark more closures as static 2021-02-07 13:26:56 +01:00
ApiQueryContinueTestBase.php Use native array_column() in tests instead of loops 2022-08-16 15:41:14 +02:00
ApiQueryDisabledTest.php Move ApiQuery* tests under the /query subdirectory 2020-10-30 03:31:12 +00:00
ApiQueryImageInfoTest.php phpunit: improve isolation by calling User::clearInstanceCache 2022-12-04 15:21:30 +01:00
ApiQueryInfoTest.php Reorg: Namespace the Title class 2023-03-02 08:46:53 -05:00
ApiQueryLanguageinfoTest.php tests: Make some PHPUnit data providers static 2023-03-24 02:53:57 +00:00
ApiQueryPrefixSearchTest.php Enable pig-latin variant for testing 2022-11-08 17:45:51 +05:30
ApiQueryRecentChangesIntegrationTest.php Reorg: Namespace the Title class 2023-03-02 08:46:53 -05:00
ApiQueryRevisionsTest.php tests: Make some PHPUnit data providers static 2023-03-24 02:53:57 +00:00
ApiQuerySearchTest.php Reorg: Namespace the Title class 2023-03-02 08:46:53 -05:00
ApiQuerySiteinfoTest.php API tests: Assert error codes, not error messages 2023-04-26 19:36:29 +02:00
ApiQueryTest.php tests: Make some PHPUnit data providers static 2023-03-24 02:53:57 +00:00
ApiQueryTestBase.php Use short array destructuring instead of list() 2022-10-21 15:33:37 +11:00
ApiQueryTokensTest.php tests/api: Add TestUser::getAuthority and use it 2022-08-06 23:15:27 +02:00
ApiQueryUserContribsTest.php Reorg: Namespace the Title class 2023-03-02 08:46:53 -05:00
ApiQueryUserInfoTest.php Add cancreateaccount property to userinfo API 2022-08-31 11:51:18 +00:00
ApiQueryWatchlistIntegrationTest.php API tests: Assert error codes, not error messages 2023-04-26 19:36:29 +02:00
ApiQueryWatchlistRawIntegrationTest.php API tests: Assert error codes, not error messages 2023-04-26 19:36:29 +02:00