Skip to content

Commit 973bcf3

Browse files
committed
fix(tests): fix SVGTest for NC <= 31
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
1 parent eee796c commit 973bcf3

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

tests/lib/Preview/SVGTest.php

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
namespace Test\Preview;
99

10+
use OCP\Files\File;
11+
1012
/**
1113
* Class SVGTest
1214
*
@@ -59,8 +61,10 @@ public function testGetThumbnailSVGHref(string $content): void {
5961
self::assertNull($this->provider->getThumbnail($file, 512, 512));
6062
}
6163

62-
#[\PHPUnit\Framework\Attributes\DataProvider('dataGetThumbnailSVGHrefNamespace')]
63-
#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('imagick')]
64+
/**
65+
* @dataProvider dataGetThumbnailSVGHrefNamespace
66+
* @requires extension imagick
67+
*/
6468
public function testGetThumbnailSvgHrefNamespace(string $namespace): void {
6569
$handle = fopen('php://temp', 'w+');
6670
fwrite($handle, '<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg" xmlns:' . $namespace . '="http://www.w3.org/1999/xlink">
@@ -86,8 +90,10 @@ public static function dataGetThumbnailSVGHrefNamespace(): array {
8690
];
8791
}
8892

89-
#[\PHPUnit\Framework\Attributes\DataProvider('dataGetThumbnailSvgEncoded')]
90-
#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('imagick')]
93+
/**
94+
* @dataProvider dataGetThumbnailSvgEncoded
95+
* @requires extension imagick
96+
*/
9197
public function testGetThumbnailSvgEncoded(string $content): void {
9298
$handle = fopen('php://temp', 'w+');
9399
fwrite($handle, $content);

0 commit comments

Comments
 (0)