wiki.techinc.nl/tests/phpunit/unit/includes/libs/filebackend
Timo Tijhof 19dd1a7154 tests: Minor follow-up to MySQLPlatformTest/FileBackendTest php8.1 fixes
Follows I3ea6fb26296f (MySQLPlatformTest):

* Avoid uncertainty and make the code improvable/removable by explaining
  what the suppression is for.

* Remove use of outdated AtEase, which hasn't been used in core tests
  for several months (ref phpcs.xml), and more generally not in new code
  in core or extensions (ref T253461).

Follows I12c17e327628 (FileBackendTest):

* I was going to similarly explain the reason by stating from the linked
  task that it is for preg_match, and I was goingn to move the wholesale
  suppression to just the getMockForAbstractClass() call that constructs
  the FileBackend and thus triggers the issue.

* Instead, I've fixed the constructor to not pass a string there in the first
  place as all non-string values are naturally invalid. Even if there is
  a way to satisfy the regex with a non-string value that casts to a
  valid string, that'd be an invalid value for a FileBackend name as it
  pubicly documented as requiring a string, and internally also stored
  and typed as assumed to be (after validation) a string.

* Change the valid test cases to be more representative of actually
  intended-to-be-valid input, and actually-likely-attempted-but-invalid
  input. The regex permits `[a-zA-Z0-9-_]` yet no numbers, capitals
  or dashes were validated by the test, and no special characters
  rejected by the test.

  This follows If29780653 (c250d07bac) from 2019 which added these test
  cases to improve code coverage without input from any (admitedly,
  non-existent) active maintainers.

Bug: T313663
Change-Id: Ia326e17231a53c7102dcb116817a0c3830c510e4
2022-07-27 18:28:35 -07:00
..
fsfile tests: Change use of AtEase to at operator 2022-02-24 21:29:51 +00:00
FileBackendTest.php tests: Minor follow-up to MySQLPlatformTest/FileBackendTest php8.1 fixes 2022-07-27 18:28:35 -07:00