wiki.techinc.nl/tests/phpunit/includes/api
Bartosz Dziewoński f1ca6b8ca9 ApiOptionsTest: Do not use ->at()
Quoting PHPUnit docs:

  The $index parameter for the at() matcher refers to the index,
  starting at zero, in all method invocations for a given mock object.
  Exercise caution when using this matcher as it can lead to brittle
  tests which are too closely tied to specific implementation details.

Indeed these test cases would break horribly with unintuitive error
messages ("Mocked method does not exist") if anything in preferences
or API code called any additional methods on the mocked user. For
example, it relied on the caching in Preferences::getPreferences(),
which is being removed in I92390120a16448383a25e9ba2dd35a434a2f21bf.

I'm pretty sure all that matters here is that all the setOption()
calls with different arguments happen, so let's test just that.

Change-Id: I30a814151a006e5f147eebb918344049807b2b97
2017-11-15 11:04:09 +00:00
..
format API: i18n for warnings and errors 2016-12-06 10:20:48 -05:00
query Remove empty lines at begin of function, if, foreach, switch 2017-07-01 11:34:16 +00:00
ApiBaseTest.php API: Restore ability for dieStatus() to be passed a non-fatal Status 2017-06-13 10:30:24 -04:00
ApiBlockTest.php Block API: Allow blocking/unblocking by user's ID 2016-12-13 18:16:24 +05:30
ApiComparePagesTest.php API: Rewrite ApiComparePages 2017-06-05 12:23:32 -07:00
ApiContinuationManagerTest.php API: i18n for warnings and errors 2016-12-06 10:20:48 -05:00
ApiEditPageTest.php Improve namespace handling in tests 2017-09-29 05:21:47 +00:00
ApiErrorFormatterTest.php API: Add deprecation warnings for Iae0e2ce3 2017-06-22 13:21:08 -04:00
ApiLoginTest.php Switch to librarized version of TestingAccessWrapper 2017-04-20 14:15:57 +00:00
ApiMainTest.php API: Add deprecation warnings for Iae0e2ce3 2017-06-22 13:21:08 -04:00
ApiMessageTest.php Switch to librarized version of TestingAccessWrapper 2017-04-20 14:15:57 +00:00
ApiModuleManagerTest.php Convert all array() syntax to [] 2016-02-17 01:33:00 -08:00
ApiOpenSearchTest.php Remove unused imports from test classes 2017-01-10 11:49:58 +01:00
ApiOptionsTest.php ApiOptionsTest: Do not use ->at() 2017-11-15 11:04:09 +00:00
ApiPageSetTest.php build: Prepare for mediawiki/mediawiki-codesniffer to 0.9.0 2017-06-26 17:14:31 +00:00
ApiParseTest.php API: Include setupSkinUserCss in prop=modules for useskin mode 2017-10-25 02:16:01 +01:00
ApiPurgeTest.php Convert all array() syntax to [] 2016-02-17 01:33:00 -08:00
ApiQueryAllPagesTest.php tests: Replace implicit Bugzilla bug numbers with Phab ones 2017-02-21 02:14:34 +00:00
ApiQueryWatchlistIntegrationTest.php Add comment table and code to start using it 2017-08-30 15:05:00 +10:00
ApiQueryWatchlistRawIntegrationTest.php API: i18n for warnings and errors 2016-12-06 10:20:48 -05:00
ApiResultTest.php Remove empty lines at end of functions 2016-11-05 11:55:10 +01:00
ApiRevisionDeleteTest.php Fix RevDel API output for formatversion=2 2016-12-19 11:48:49 -05:00
ApiSetNotificationTimestampIntegrationTest.php Add ApiSetNotificationTimestampIntegrationTest 2016-05-18 12:08:47 +01:00
ApiStashEditTest.php test: basic test for ApiStashEdit 2016-06-16 22:26:24 +02:00
ApiTestCase.php Clean up remaining get_class() uses 2017-03-07 22:03:47 +00:00
ApiTestCaseUpload.php Convert all array() syntax to [] 2016-02-17 01:33:00 -08:00
ApiTestContext.php Fixed some @params documentation (tests) 2014-04-17 20:43:42 +02:00
ApiTokensTest.php Make deprecated TestUser properties private 2016-06-22 15:43:54 +00:00
ApiUnblockTest.php API: i18n for warnings and errors 2016-12-06 10:20:48 -05:00
ApiUploadTest.php Make ApiUploadTest up to date so it passes 2017-09-22 20:49:08 +02:00
ApiUsageExceptionTest.php Fix inability of fetching message object 2017-10-04 15:24:42 +02:00
ApiWatchTest.php Remove empty lines from PHP and JavaScript comment blocks 2016-12-09 09:01:06 +00:00
generateRandomImages.php Remove empty lines at begin of function, if, foreach, switch 2017-07-01 11:34:16 +00:00
MockApi.php API: i18n for warnings and errors 2016-12-06 10:20:48 -05:00
MockApiQueryBase.php API: i18n for warnings and errors 2016-12-06 10:20:48 -05:00
PrefixUniquenessTest.php Convert all array() syntax to [] 2016-02-17 01:33:00 -08:00
RandomImageGenerator.php build: Prepare for mediawiki/mediawiki-codesniffer to 0.9.0 2017-06-26 17:14:31 +00:00
UserWrapper.php Fix numerous class/function casing 2016-03-18 23:14:49 +00:00
words.txt Add words.txt for us Windows users. This is a random selection of 1000 words from gnuwin32 miscfiles package 2011-07-15 17:13:24 +00:00