aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/api/ApiCSPReportTest.php
Commit message (Collapse)AuthorAgeFilesLines
* Add namespace to includes/api classesJames D. Forrester2024-09-251-5/+5
| | | | | Bug: T353458 Change-Id: I3ea6b08c5018ba03ba45c5766e1f46e12f6b8597
* Avoid use of deprecated wfParseUrl in MediaWiki\ApiEbrahim Byagowi2024-09-081-1/+8
| | | | Change-Id: Idd0f98ccb449735b5244bb7531327be763daceb8
* tests: Namespace api testsReedy2024-02-181-1/+7
| | | | | Bug: T357823 Change-Id: I0d7cc2c9b166d5e5b913c1305f7cee017fe377af
* tests: Fix @covers and @coversDefaultClass to have leading \Reedy2024-02-161-1/+1
| | | | Change-Id: I5629f91387f2ac453ee4341bfe4bba310bd52f03
* Reorg: Move some of request related classes to MediaWiki/RequestAmir Sarabadani2022-10-281-0/+1
| | | | | | | | | | | | | | | Redoing I5ea70120d74 but without moving WebRequest that caused issues with phan-taint-plugin. Moving: - DerivativeRequest - FauxRequest - FauxRequestUpload - PathRouter - WebRequestUpload Bug: T321882 Change-Id: I832b133aaf61ee9f6190b0227d2f3de99bd1717b
* Revert "Reorg: Move some of request related classes to MediaWiki/Request"Zabe2022-10-271-1/+0
| | | | | | | | | This reverts commit 2bdc0b2b7209441a42a784157633a8a01b321922. Reason for revert: T166010#8349431 Bug: T166010 Change-Id: Idcd3025647aec99532f5d69b9c1718c531761283
* Reorg: Move some of request related classes to MediaWiki/RequestAmir Sarabadani2022-10-261-0/+1
| | | | | | | | | | | | | Moving: - DerivativeRequest - FauxRequest - FauxRequestUpload - PathRouter - WebRequest - WebRequestUpload Bug: T166010 Change-Id: I5ea70120d745f2876ae31d039f3f8a51e49e9ad8
* tests: Use `overrideConfig(Value|Values)` where neededDerick Alangi2022-07-121-5/+6
| | | | | | | This patch covers: tests/phpunit/includes/actions/ and tests/phpunit/includes/api/. Change-Id: I60d8fb7b8a63b423606db935fa0d24cf859b2512
* Tests: Cleanup some unnecessary nested function callsReedy2022-06-061-4/+4
| | | | | | Replace ->will( ->return with ->willReturn( Change-Id: Ia2dfafa03cac8169d86d6fa5a30b73bfad1fe9fa
* phpunit: Mass-replace setMethods with onlyMethods and adjustDaimona Eaytoy2021-04-161-2/+2
| | | | | | | | | | | | 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
* ApiCSPReportTest: remove unneeded setMwGlobals()DannyS7122021-03-241-7/+0
| | | | | | | | | 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
* Tests: Mark more more closures as staticUmherirrender2021-02-091-2/+2
| | | | | | | Result of a new sniff I25a17fb22b6b669e817317a0f45051ae9c608208 Bug: T274036 Change-Id: I695873737167a75f0d94901fa40383a33984ca55
* Fix visibility of setUp/tearDownThiemo Kreuz2020-06-161-1/+1
| | | | Change-Id: I636be48eb9f713680abac35d46091f7b49374696
* tests: Add explicit return type void to setUp() and tearDown()Max Semenik2019-10-301-1/+1
| | | | | | Bug: T192167 Depends-On: I581e54278ac5da3f4e399e33f2c7ad468bae6b43 Change-Id: I3a21fb55db76bac51afdd399cf40ed0760e4f343
* API: Fix 'user_id' field of ApiCSPReportTimo Tijhof2019-07-191-2/+1
| | | | | | | Was accidentally turned into an always-true boolean in 5f343617, due to confusion with JavaScript's default '||' operator. Change-Id: I24071e22f8bb7a296ae138303f63acdb8ea4950a
* API: Add test case for ApiCSPReportTestTimo Tijhof2019-07-191-0/+121
Covers the basic functioning of the class, as well as the specific behaviours introduced or changed by 5f34361759 and 0ca1b8a0e621c9. 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