Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
test: adjust library tests for PHPunit deprecations
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
  • Loading branch information
susnux committed May 28, 2025
commit 9422b6d6d01bc5f533c86f4544ed4e5d1f68f6e5
6 changes: 3 additions & 3 deletions tests/lib/App/AppManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,15 +159,15 @@ public function testGetAppIcon($callback, ?bool $dark, ?string $expected): void
}
}

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;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/Files/FilenameValidatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ public function testSanitizeFilename(
$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'
Expand Down