Commit graph

16 commits

Author SHA1 Message Date
Amir Sarabadani
f5abfb8d58 Bump codesniffer to 42.0.0
Most noisily, this enables MediaWiki.Arrays.OneSpaceInlineArray.

Change-Id: I8ab11399c67ce7e3ab1b6249b591452774393428
2023-09-27 15:06:32 -04:00
Timo Tijhof
2748a06e35 Benchmarker: Substitute long arguments in generated case names
If using bench() with unnamed arrays containing 'function' keys
and potentially large values in 'args' keys, then don't dump these
potentially many-lines of fixtue data into the result.

Limit the arg dump to at most one line of 80 chars. Beyond that
shorten it to `fname@1` etc.

Bug: T318502
Change-Id: I02a8cf550c1ef0eea6fe52d1c134519bc9f8d99f
2023-01-10 16:50:00 +00:00
Reedy
c5f96e7e64 BenchmarkerTest: Minor cleanup
Change-Id: If4ba68dfe938b38a58f60e0586d4e23c123f15e2
2022-09-25 19:19:36 +01:00
Reedy
41c42d5435 Tests: Cleanup some unnecessary nested function calls
Replace ->will( ->return with ->willReturn(

Change-Id: Ia2dfafa03cac8169d86d6fa5a30b73bfad1fe9fa
2022-06-06 01:02:34 +01:00
daniel
a9f47fd5ad Extract parameter handling from Maintenance base class.
We will need parameter handling in the runner as well as in the actual
maintenance script. So pull it out, so we can re-use it.

Change-Id: Ib67667fead8350e0a539323fb05b160f4c2d882e
2022-05-25 10:40:24 +02:00
Reedy
0285cf5c8f Benchmark: Force string representation of arguments
Output becomes:
`MediaWiki\Extension\TrustedXFF\TrustedXFF::onIsTrustedProxy('107.167.115.215', false)`

Rather than:

`MediaWiki\Extension\TrustedXFF\TrustedXFF::onIsTrustedProxy('107.167.115.215', )`

Change-Id: Id0139283ab15f0060c61425d89f76fed309855e2
2022-03-11 23:14:36 +00:00
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
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
Reedy
729f20afc8 Tests: Mark more closures as static
Bug: T274036
Change-Id: I911d3041cebe417d162934223b46ea295c6d20e3
2021-02-07 13:26:56 +01:00
Max Semenik
e14fa40ecd More backwards compatible changes for PHPUnit
The change in XmlTest is because PHPUnit 8 messes with serialization
settings.

Bug: T192167
Change-Id: I5c9358d7cfc451845e01fca67c8d15add4039dae
2019-11-12 17:07:23 -08:00
Max Semenik
dd7026585c Backwards-compatible PHPUnit 8 preparations
This commit splits changes from Ic14f5debc53e55d6714 to reduce it to
only strictly needed things. It can be merged immediately.

Bug: T192167
Change-Id: I8c541a66ea13421dbe7fa51d197d5455cc4786eb
2019-11-02 12:40:07 -07:00
Umherirrender
63d96c15fd build: Updating mediawiki/mediawiki-codesniffer to 16.0.0
Change-Id: I59b59f79bbf3ce4feff3b3a20c1c31bc16370531
2018-02-17 13:29:13 +01:00
Adam Roses Wight
06fe44872c Revert accidentally removed trait
Change-Id: I82283be89f3f155d7793d4c900927d81a60d5e95
2018-01-18 19:08:25 +00:00
Adam Roses Wight
c7e8c25e8f New namespace MediaWiki\Tests\Maintenance
Bug: T184775
Change-Id: I041b8eb4f1ef3cf882a8082ff3f208604b8edf96
2018-01-16 15:09:44 -05:00
Kunal Mehta
75160bdd3b Use MediaWikiCoversValidator for tests that don't use MediaWikiTestCase
Change-Id: I8c4de7e9c72c9969088666007b54c6fd23f6cc13
2018-01-01 08:28:02 +00:00
Timo Tijhof
25ce819e1c maintenance: Add unit test for Benchmarker class
Change-Id: I3f835fc07741fd42b8adb5b019f72589429cc14f
2017-12-27 22:15:21 +00:00