aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Files/Stream/HashWrapperTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Files/Stream/HashWrapperTest.php')
-rw-r--r--tests/lib/Files/Stream/HashWrapperTest.php8
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/lib/Files/Stream/HashWrapperTest.php b/tests/lib/Files/Stream/HashWrapperTest.php
index ee50fe3b13a..459bc5c4318 100644
--- a/tests/lib/Files/Stream/HashWrapperTest.php
+++ b/tests/lib/Files/Stream/HashWrapperTest.php
@@ -12,9 +12,7 @@ use OC\Files\Stream\HashWrapper;
use Test\TestCase;
class HashWrapperTest extends TestCase {
- /**
- * @dataProvider hashProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('hashProvider')]
public function testHashStream($data, string $algo, string $hash): void {
if (!is_resource($data)) {
$tmpData = fopen('php://temp', 'r+');
@@ -25,13 +23,13 @@ class HashWrapperTest extends TestCase {
$data = $tmpData;
}
- $wrapper = HashWrapper::wrap($data, $algo, function ($result) use ($hash) {
+ $wrapper = HashWrapper::wrap($data, $algo, function ($result) use ($hash): void {
$this->assertEquals($hash, $result);
});
stream_get_contents($wrapper);
}
- public function hashProvider() {
+ public static function hashProvider(): array {
return [
['foo', 'md5', 'acbd18db4cc2f85cedef654fccc4a4d8'],
['foo', 'sha1', '0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33'],