Commit graph

19 commits

Author SHA1 Message Date
Florian fe6d078b9f [recaptcha] Remove the ReCaptcha module
It's not supported by Google for a while.

Bug: T223749
Change-Id: I159cdd4882c1de48d6cee359faa153a2e6e0424b
2019-06-22 10:38:39 +01:00
Aryeh Gregor 4228dbd2b7 Do not reset extension registry in tests
This breaks later tests, e.g.:

https://gerrit.wikimedia.org/r/c/mediawiki/core/+/450433
https://gerrit.wikimedia.org/r/c/mediawiki/core/+/465423

The only reason this didn't cause test failures until now is because the
namespace data was getting (incorrectly) cached in between tests.  As
soon as we start resetting namespaces for each test, namespaces set by
the extension registry get wiped out by these tests.

Change-Id: Icb7a4a2a5d19fb1f2453b4b57a5271196b0e316d
2019-04-09 20:29:49 +03: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 9fc9337fca Use new ExtensionRegistry::setAttributeForTest() in tests
So we don't need to hackily deal with ExtensionRegistry internals.

Depends-On: I9e62a02ed2044c847e9ab2dcdfab094001f88986
Change-Id: Id6ca6eb49db789dbb3f227533c4442506cc61bc4
2019-01-14 10:34:22 -08:00
Aryeh Gregor 422dccc7b0 Do not attempt to mock 'object'
This doesn't work in PHP 7.2, because 'object' is no longer a valid
class name.  stdClass works fine.

Change-Id: I47375fdf2f36ff62985b2e8c90fa0e5230273984
2018-10-09 15:10:33 +03:00
Max Semenik 5b7a36a521 Clean up some phpcs problems
Change-Id: Ie956fe86184535a376d0398483ac3c853fa9127c
2018-07-12 23:13:58 +00:00
Eddie Greiner-Petter 2848a699db Move "can user skip captchas" check to own function
As a direct effect
- sending emails and creating accounts now respects $wgAllowConfirmedEmail
- log messages get a bit less verbose for mail sending and creating
  accounts (but should be clear from the context what action was
  performed)
- less code duplication \o/

Indirectly, this should make solving the attached bug easy(tm), because it
just needs to add a hook to the canSkipCaptcha function.

Bug: T176589
Change-Id: Id27b0eadbab7300b9e6969d406fa6f00ef0888bf
2018-05-19 13:27:04 +00:00
libraryupgrader 08bfd32590 build: Updating mediawiki/mediawiki-codesniffer to 16.0.0
Change-Id: Ide145e5755e0bec11fe19c18889c92a0e9d78037
2018-02-15 09:34:50 +00:00
Kunal Mehta e1f45829d4 Add @covers tags
Change-Id: I1e99261acb13c86e96c1b2dd1cb61918ebc660c2
2018-01-23 15:59:08 -08:00
Umherirrender 79b09f4995 Register QuestyCaptcha class ealier in unit tests
The captchas in production are registered conditional, in tests the
class needs to be added to the autoloader.
Moved this register up to setUp to detect the existing @covers correctly
by the new testValidCovers from
I1d564bcae2bfbedb004c440b90db6341148ed4ba

Change-Id: I79f225126d7bbbfd436ab165bb98a0ed9517b8bc
2017-12-27 21:59:34 +01:00
jenkins-bot 7aae3b655b Merge "Allow other extensions to setup triggers using attributes" 2017-10-24 17:49:56 +00:00
Reedy 9efde84c36 Remove pre-authmanager code
Bug: T178026
Change-Id: I8604c95e4de28cc15a821bc2cc27a3e4b239d85e
2017-10-12 01:47:11 +01:00
libraryupgrader 8b439b582d build: Updating mediawiki/mediawiki-codesniffer to 13.0.0
Change-Id: I155f72352224f230e94950f149fba400f26cbe6c
2017-09-24 10:04:06 +00:00
Florian Schmidt 50bc57a200 Allow other extensions to setup triggers using attributes
Instead of misusing the config section of extension.json to declare
captcha triggers in the ConfirmEdits CaptchaTriggers config variable,
other extensions can now use the CaptchaTriggers attribute for the
exact same thing. E.g., to declare a new trigger, the following
addition to the own extension.json will register the trigger in
ConfirmEdit:

  "CaptchaTriggers": {
    "wikiforum": true
  }

This also removes the CaptchaClass config from the main extension.json
config section, and automatically sets the SimpleCaptcha module in the
getInstance() method of ConfirmEditHooks, which is a pre-requirement for
the mediawiki/core change Ieeb26011e42c741041d2c3252238ca0823b99eb4.

Bug: T152929
Change-Id: I4c5eaf87657f5dc07787480a2f1a56a1db8c714f
2017-09-02 17:45:26 +02:00
Umherirrender 1d60bc25d2 build: Updating mediawiki/mediawiki-codesniffer to 0.10.0
Change-Id: I8d107ad6801fe1a5ce7b8feb8e1e730d504a2fb3
2017-07-08 16:04:35 +02: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