Commit graph

19 commits

Author SHA1 Message Date
gerritbot f6bd4eb1aa Update moved class FauxRequest
See T321882. Moved in I832b133aaf61ee

Bug: T321681
Change-Id: Ic7accc3410547a0d1ff9d7a04836a7f6e64872f9
2023-05-19 14:15:24 +03:00
Umherirrender cb6254fe5f tests: Replace assertEmpty with assertSame
assertSame avoids use of loose comparisons and
allows to check the expected type

Change-Id: I4e1efb254365ed551c1240c6ab7a8a270969a1d0
2022-11-24 23:02:46 +01:00
Reedy 30cd1d8a23 Namespace base classes
Change-Id: I3fa9747e0ea970c5de39e2da8603e1bba9388a69
2022-07-30 18:13:03 +00:00
libraryupgrader 81a524e2e9 build: Updating dependencies
composer:
* mediawiki/mediawiki-codesniffer: 36.0.0 → 37.0.0

npm:
* postcss: 7.0.35 → 7.0.36
  * https://npmjs.com/advisories/1693 (CVE-2021-23368)
* glob-parent: 5.1.0 → 5.1.2
  * https://npmjs.com/advisories/1751 (CVE-2020-28469)
* trim-newlines: 3.0.0 → 3.0.1
  * https://npmjs.com/advisories/1753 (CVE-2021-33623)

Change-Id: I57837ebf8054a2e968d207fecb3f12397c18e2a2
2021-07-22 14:24:25 +00:00
vladshapik 824ef272dd Replace uses of the deprecated setters of AbstractAuthenticationProvider
Since AbstractAuthenticationProvider ::setLogger, ::setManager,
::setConfig, ::setHookContainer methods had been soft deprecated,
so its usages were removed. AuthenticationProviderTestTrait
::initProvider was used in order to initialize
CaptchaPreAuthenticationProvider in the test.
* Also bump required MW version to 1.37.0

Bug: T281993
Change-Id: I9a139433b089597a2a5dfb7e23338fc8f7183b47
2021-05-25 15:34:56 +00:00
libraryupgrader bef3c335b5 build: Updating composer dependencies
* mediawiki/mediawiki-codesniffer: 35.0.0 → 36.0.0
* php-parallel-lint/php-parallel-lint: 1.2.0 → 1.3.0

Change-Id: Ib16a714334088d26d3fbaa88b5c9395fa0ab67a5
2021-05-04 04:14:03 +00:00
Umherirrender 76ff299d8c Use MediaWikiServices::getAuthManager
This required MediaWiki 1.35 (already set in extension.json)

Change-Id: Ic640f25b299dd7be429766f028ec91ab9481c85c
2020-04-04 16:57:51 +02:00
Brad Jorsch 003237ce9c Fix test hooking of 'PingLimiter'
The code was setting $wgHooks['PingLimiter'] to a Closure rather than
an array of callables, which resulted in the hook never actually being
called.

Interesting that that didn't make any of the tests fail. Anyway, let's
switch to using the setTemporaryHook() method now provided by MW's base
test class.

Change-Id: I6ac22b3c43735dcab4920de827bf06e25f9adc04
2020-04-02 15:22:22 -04:00
mainframe98 e95765a45e Don't conditionally set ObjectCache::$instances
The service LocalClusterObjectCache (to be introduced
in I39b03b1078efde3d9bc721d9d0c3694988c53a67) is not yet available.
The change linked above introduces it, but still relies on ObjectCache
because of tests of other extensions. ConfirmEdit's tests therefore
should always set ObjectCache::$instances, regardless of the existance
of the LocalClusterObjectCache service.

Change-Id: Ide340b7295ebe63a4efcfe6ec4381eb6697f8335
2020-01-21 17:28:22 +00:00
Max Semenik 9380fa050e Stop passing objects by reference
Bug: T193950
Change-Id: I8c4aabe75ffce55f81c7ffb0f76b67155db1f761
2020-01-17 20:08:16 +00:00
Max Semenik 8b6b9aaa86 tests: getMock() is deprecated
Bug: T192167
Change-Id: I385dccbcda40c71201ce1f5553cb30dee53a6a33
2019-10-21 22:20:51 -07:00
James D. Forrester 86246f0172 build: Upgrade mediawiki-codesniffer to v28.0.0
Change-Id: I12c3660e74e42937f6cfb31ec4771a67d8651f42
2019-10-09 15:45:51 -07:00
Umherirrender f96b1eda5b Use ::class for class name resolution
Available since php5.5

Change-Id: I9b072c487b84e04fbb7e9ad8ed4b9db46d805ee8
2019-03-02 19:39:36 +01:00
Kunal Mehta e1f45829d4 Add @covers tags
Change-Id: I1e99261acb13c86e96c1b2dd1cb61918ebc660c2
2018-01-23 15:59:08 -08:00
Reedy 9efde84c36 Remove pre-authmanager code
Bug: T178026
Change-Id: I8604c95e4de28cc15a821bc2cc27a3e4b239d85e
2017-10-12 01:47:11 +01:00
Gergő Tisza 67a909fd8a Switch TestingAccessWrapper to librarized version
Bug: T163434
Change-Id: I7d262901f0ae66f20658516bad8aa2d8de3a40f7
Depends-On: I52cc257e593da3d6c3b01a909e554a950225aec8
2017-04-20 11:35:07 +00:00
Bryan Davis ed9886f6fd Set valid $wgRateLimits in tests
Change-Id: Iacdd1719d5f08eca91de0a35c0042ffee2136f34
2016-10-03 23:36:43 -06:00
Aaron Schulz 1cf32cf036 Reset the LocalClusterObjectCache service in tests
Change-Id: I0886e749dee19d729bcd4f398d65b78aa22a8065
2016-09-12 10:24:27 +00:00
Reedy 6a8c53f6d1 Remove 'UnitTestList' hook
No longer needed now that extension unittests are autodiscovered.

Bug: T142120
Bug: T142121
Change-Id: I7105170e56c8c3ec3837dd15be869e503bccecde
2016-08-05 18:46:15 +01:00
Renamed from tests/CaptchaPreAuthenticationProviderTest.php (Browse further)