test: adjust library tests for PHPunit deprecations

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
pull/53153/head
Ferdinand Thiessen 2025-05-28 10:41:55 +07:00
parent 85c141e107
commit 9422b6d6d0
No known key found for this signature in database
GPG Key ID: 45FAE7268762B400
2 changed files with 4 additions and 4 deletions

@ -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'