test: adjust library tests for PHPunit deprecations

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
pull/53153/head
Ferdinand Thiessen 11 months ago
parent 85c141e107
commit 9422b6d6d0
No known key found for this signature in database
GPG Key ID: 45FAE7268762B400
  1. 6
      tests/lib/App/AppManagerTest.php
  2. 2
      tests/lib/Files/FilenameValidatorTest.php

@ -159,15 +159,15 @@ class AppManagerTest extends TestCase {
}
}
public function dataGetAppIcon(): array {
public static function dataGetAppIcon(): array {
$nothing = function ($appId) {
$this->assertEquals('test', $appId);
self::assertEquals('test', $appId);
throw new \RuntimeException();
};
$createCallback = function ($workingIcons) {
return function ($appId, $icon) use ($workingIcons) {
$this->assertEquals('test', $appId);
self::assertEquals('test', $appId);
if (in_array($icon, $workingIcons)) {
return '/path/' . $icon;
}

@ -409,7 +409,7 @@ class FilenameValidatorTest extends TestCase {
$this->assertEquals($expected, $validator->sanitizeFilename($filename));
}
public function dataSanitizeFilename(): array {
public static function dataSanitizeFilename(): array {
return [
'valid name' => [
'a * b.txt', ['.htaccess'], [], [], [], 'a * b.txt'

Loading…
Cancel
Save