Commit graph

7 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
DannyS712
d5d2f64dcf ApiCSPReportTest: remove unneeded setMwGlobals()
Called with "CSPFalsePositiveUrls" instead of
"wgCSPFalsePositiveUrls", so not currently changing the
actual global that matters, and since the test is passing
as-is no need to fix, we can just remove

Change-Id: I1b599bc0f7eff05e3ca68e1a0a326264a192bdd7
2021-03-24 17:28:43 +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
Thiemo Kreuz
5f3a92385b Fix visibility of setUp/tearDown
Change-Id: I636be48eb9f713680abac35d46091f7b49374696
2020-06-16 21:02:05 +02:00
Max Semenik
48a323f702 tests: Add explicit return type void to setUp() and tearDown()
Bug: T192167
Depends-On: I581e54278ac5da3f4e399e33f2c7ad468bae6b43
Change-Id: I3a21fb55db76bac51afdd399cf40ed0760e4f343
2019-10-30 14:31:22 -07:00
Timo Tijhof
6b3b05558f API: Fix 'user_id' field of ApiCSPReport
Was accidentally turned into an always-true boolean in 5f343617,
due to confusion with JavaScript's default '||' operator.

Change-Id: I24071e22f8bb7a296ae138303f63acdb8ea4950a
2019-07-19 22:58:39 +01:00
Timo Tijhof
4b01004a1f API: Add test case for ApiCSPReportTest
Covers the basic functioning of the class, as well as the specific
behaviours introduced or changed by 5f34361759 and 0ca1b8a0e6.

Also includes a (bad) expectation for 'user_id' (bool instead of string),
which is a bug caused by 5f34361759 that the next commit will fix.

Change-Id: I2c57c813b8a31e51a61778951227ccbd1217a547
2019-07-19 22:58:39 +01:00