aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/auth/UserDataAuthenticationRequestTest.php
Commit message (Collapse)AuthorAgeFilesLines
* authmanager: Make some tests more robustGergő Tisza2024-07-281-0/+7
| | | | | | | Clear various hooks that CentralAuth would override, potentially breaking the tests depending on configuration. Change-Id: I86d9d02a89b058a7ff399be731b42f12a959f1ae
* tests: More use statements in auth testsReedy2024-02-161-3/+4
| | | | Change-Id: Ic57b19a779065a18112334d79ede395ced1a202b
* tests: Add Tests to PHP namespacingReedy2024-02-161-1/+2
| | | | Change-Id: I849268172751d50292e93aa75abe8094873f56bc
* Namespace User under \MediaWiki\UserJames D. Forrester2023-09-191-1/+2
| | | | | Bug: T166010 Change-Id: I7257302b485588af31384d4f7fc8e30551f161f1
* tests: Allow overridable data providers to be staticmainframe982023-05-161-1/+1
| | | | | | | | | | | | | | | | This uses some reflection to identify if the data provider is static or not. If it isn't, a deprecation notice is emitted. This doesn't fail the tests, but is still printed in the output. To facilitate this, the relevant abstract method has been uncommented, as PHP does not like it when function signatures do not match up. This approach means that tests in extensions or skins do not immediately break when making data providers static. Instead, they can do so at their own pace. Bug: T332865 Change-Id: I5ff35ad0e894f0a27beae00257dc1fc599ad518d
* tests: Change multiple calls from overrideConfigValue to overrideConfigValuesUmherirrender2022-08-171-2/+4
| | | | | | Also change loops to multi-value function Change-Id: I2301cc246b7f8ca3028d44d70756a5e1ba04e82d
* tests: Use MainConfigNames constants on overrideConfigValueUmherirrender2022-07-121-3/+5
| | | | Change-Id: Ieeefb88daf55a976883f6e20ef6881c89a7f7630
* PHPUnit: introduce overrideConfigValues.daniel2022-06-211-3/+3
| | | | | | | | | | overrideConfigValues() is introduced as a replacement for setMwGlobals(). Since we are moving away from reading configuration from global variables, test cases should not use global variables to set configuration. Bug: T294739 Change-Id: I9d41045bd13932bd853f53e00322233fc4f1321c
* tests: Fix types in documentation by adding use statementsUmherirrender2022-05-291-1/+1
| | | | | | | Some types used in @param/@return are not correct, because the class is not used with namespace Change-Id: Ic2643687378a6addabc2c9cd402224e442257f86
* build: Updating dependencieslibraryupgrader2021-07-221-1/+1
| | | | | | | | | | | | | | composer: * mediawiki/mediawiki-codesniffer: 36.0.0 → 37.0.0 The following sniffs now pass and were enabled: * Generic.ControlStructures.InlineControlStructure * MediaWiki.PHPUnit.AssertCount.NotUsed npm: * svgo: 2.3.0 → 2.3.1 * https://npmjs.com/advisories/1754 (CVE-2021-33587) Change-Id: I2a9bbee2fecbf7259876d335f565ece4b3622426
* tests: Add explicit return type void to setUp() and tearDown()Max Semenik2019-10-301-1/+1
| | | | | | Bug: T192167 Depends-On: I581e54278ac5da3f4e399e33f2c7ad468bae6b43 Change-Id: I3a21fb55db76bac51afdd399cf40ed0760e4f343
* Fix method/function names case mismatch in core filesDerick Alangi2019-08-311-1/+1
| | | | | | | | | | | PHP doesn't care much but I think we humans do because we should call methods by the name we give them. Method fixed are; - isOk() -> isOK() - setOk() -> setOK() - teardown() -> tearDown() Change-Id: I6b3f0cf3902887058efa426968da380803869e0b
* Get rid of unnecessary func_get_args() and friendsAryeh Gregor2019-04-121-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | HHVM does not support variadic arguments with type hints. This is mostly not a big problem, because we can just drop the type hint, but for some reason PHPUnit adds a type hint of "array" when it creates mocks, so a class with a variadic method can't be mocked (at least in some cases). As such, I left alone all the classes that seem like someone might like to mock them, like Title and User. If anyone wants to mock them in the future, they'll have to switch back to func_get_args(). Some of the changes are definitely safe, like functions and test classes. In most cases, func_get_args() (and/or func_get_arg(), func_num_args() ) were only present because the code was written before we required PHP 5.6, and writing them as variadic functions is strictly superior. In some cases I left them alone, aside from HHVM compatibility: * Forwarding all arguments to another function. It's useful to keep func_get_args() here where we want to keep the list of expected arguments and their meanings in the function signature line for documentation purposes, but don't want to copy-paste a long line of argument names. * Handling deprecated calling conventions. * One or two miscellaneous cases where we're basically using the arguments individually but want to use them as an array as well for some reason. Change-Id: I066ec95a7beb7c0665146195a08e7cce1222c788
* Fix undefined NS with @covers tags in /includes/auth/Alangi Derick2018-11-011-1/+1
| | | | | | Should MW Codesniffer also handle these as well? Change-Id: Ieb493bddd5f3674fb889b4a780d51b50d89c4f65
* Remove empty lines at end of functionsumherirrender2016-11-051-1/+0
| | | | | | | | It looks like there is something missing after the last statement Also remove some other empty lines at begin of functions, ifs or loops while at these files Change-Id: Ib00b5cfd31ca4dcd0c32ce33754d3c80bae70641
* Add AuthManagerBrad Jorsch2016-05-161-0/+177
This implements the AuthManager class and its needed interfaces and subclasses, and integrates them into the backend portion of MediaWiki. Integration with frontend portions of MediaWiki (e.g. ApiLogin, Special:Login) is left for a followup. Bug: T91699 Bug: T71589 Bug: T111299 Co-Authored-By: Gergő Tisza <gtisza@wikimedia.org> Change-Id: If89d24838e326fe25fe867d02181eebcfbb0e196