Commit graph

8 commits

Author SHA1 Message Date
Wandji69
fc3e8aa641 Tests: Replace "db" with getDb method
Bug: T316841
Change-Id: Ie6b08125b76d2d4b7a30375357dcb90aaa0189c1
2024-06-30 20:24:06 +01:00
Kosta Harlan
4deb0f7a87
BackupDumperPagerTest/TextPassDumperDatabaseTest: Use sysop user for page creation
Why:

- The page creation process involves deleting revisions, and this will
  fail with a default request context that has an anonymous user
  associated with it when temp accounts are enabled

What:

- Set a sysop, named user in the request context used with revision
  deletion

Bug: T365669
Change-Id: I0faeba23f1cbefee70a4db5bfe647576f5b70975
2024-06-27 12:48:52 +02:00
Reedy
85396a9c99 tests: Fix @covers and @coversDefaultClass to have leading \
Change-Id: I5629f91387f2ac453ee4341bfe4bba310bd52f03
2024-02-16 22:43:56 +00:00
Daimona Eaytoy
7acfa6a0a5 Replace more instances of unchecked MWException
Most (all?) of the remaining usages are caught somewhere and will be
migrated later.

Bug: T328220
Change-Id: I5c36693a5361dd75b4f1e7a0bab5ad48626ed75c
2024-01-23 16:20:53 +00:00
Daimona Eaytoy
48a1c0bb2f Autofix spacing around commas
This was done automatically using the
`Universal.WhiteSpace.CommaSpacing` sniff, which will be included in the
next release of the MW PHPCS config.

Some of these have been adjusted manually where the autofix broke
vertical alignment.

Change-Id: I54a4668d8a2759b9d7de47742c943a535a04e211
2023-10-25 01:08:44 +02:00
Umherirrender
d36073cdcf tests: Make some PHPUnit data providers static
Initally used a new sniff with autofix (T333745),
but some provide are defined non-static in TestBase class
and need more work to make them static in a compatible way

Bug: T332865
Change-Id: I889d33424f0c01fb26f2d86f8d4fc3de3e568843
2023-05-20 01:05:27 +02:00
Tim Starling
be3018b268 Just another 80 or so PHPStorm inspection fixes (#4)
* Unnecessary regex modifier. I agree with this inspection which flags
  /s modifiers on regexes that don't use a dot.
* Property declared dynamically.
* Unused local variable. But it's acceptable for an unused local
  variable to take the return value of a method under test, when it is
  being tested for its side-effects. And it's acceptable for an unused
  local variable to document unused list expansion elements, or the
  nature of array keys in a foreach.

Change-Id: I067b5b45dd1138c00e7269b66d3d1385f202fe7f
2023-03-25 00:39:06 +00:00
Aaron Schulz
efe12600cf tests: Rename various test files to match the class
Change-Id: Iaf17a0001fe801045f6299d9ebdbb96ed9aeff5e
2023-01-22 19:43:52 +00:00
Renamed from tests/phpunit/maintenance/backupTextPassTest.php (Browse further)