Commit graph

6 commits

Author SHA1 Message Date
Daimona Eaytoy
535d7abf59 phpunit: Mass-replace setMethods with onlyMethods and adjust
Ended up using
  grep -Prl '\->setMethods\(' . | xargs sed -r -i 's/setMethods\(/onlyMethods\(/g'

special-casing setMethods( null ) -> onlyMethods( [] )

and then manual fix of failing test (from PS2 onwards).

Bug: T278010
Change-Id: I012dca7ae774bb430c1c44d50991ba0b633353f1
2021-04-16 20:15:00 +02:00
jenkins-bot
085f7d5c22 Merge "Make TypeDefTestCase::getInstance() abstract." 2021-02-09 08:46:29 +00:00
Umherirrender
a1de8b8700 Tests: Mark more more closures as static
Result of a new sniff I25a17fb22b6b669e817317a0f45051ae9c608208

Bug: T274036
Change-Id: I695873737167a75f0d94901fa40383a33984ca55
2021-02-09 02:55:57 +00:00
Ammarpad
252fd6ff97 Make TypeDefTestCase::getInstance() abstract.
Required to be overriden by every subclass via direct override
or the indirect static property, which is used only for this
purpose.

The benefit of that is this automatically allow us to remove the
custom Logic exception/property null handling. It also obsoletes
the property itself, which is already a form of redundancy.

Additionaly it removes duplication in classes that are providing
the property and duplicating the base class method code, like
StringDefTest.php

It's better if every child class provide the needed instance via
consistent way and that which is not redundant with another.

Change-Id: Ibe10c2c01b381190cc92e7ee2e1e0888c16e5bf4
2021-02-06 12:31:00 +01:00
Brad Jorsch
d4c2f0d899 Move some validation logic from ApiStructureTest to ParamValidator
ApiStructureTest has a lot of logic for validating Action API settings
arrays during CI. Some of that logic should be part of ParamValidator
instead.

Bug: T242887
Change-Id: I3c3d23e38456de19179ae3e5855397316b6e4c40
Depends-On: I04de72d731b94468d8a12b35df67f359382b3742
2020-02-04 20:29:35 +00:00
Brad Jorsch
c2b1525908 API: Use ParamValidator library
This brings significant modularization to the Action API's parameter
validation, and allows the Action API and MW REST API to share
validation code.

Note there are several changes in this patch that may affect other code;
see the entries in RELEASE-NOTES-1.35 for details.

Bug: T142080
Bug: T232672
Bug: T21195
Bug: T34675
Bug: T154774
Change-Id: I1462edc1701278760fa695308007006868b249fc
Depends-On: I10011be060fe6d27c7527312ad41218786b3f40d
2020-02-04 13:36:14 -05:00