diff options
Diffstat (limited to 'tests/lib/UrlGeneratorTest.php')
-rw-r--r-- | tests/lib/UrlGeneratorTest.php | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/tests/lib/UrlGeneratorTest.php b/tests/lib/UrlGeneratorTest.php index 48460519177..4320efc4190 100644 --- a/tests/lib/UrlGeneratorTest.php +++ b/tests/lib/UrlGeneratorTest.php @@ -71,8 +71,8 @@ class UrlGeneratorTest extends \Test\TestCase { /** * @small * test linkTo URL construction - * @dataProvider provideDocRootAppUrlParts */ + #[\PHPUnit\Framework\Attributes\DataProvider('provideDocRootAppUrlParts')] public function testLinkToDocRoot($app, $file, $args, $expectedResult): void { \OC::$WEBROOT = ''; $result = $this->urlGenerator->linkTo($app, $file, $args); @@ -82,17 +82,15 @@ class UrlGeneratorTest extends \Test\TestCase { /** * @small * test linkTo URL construction in sub directory - * @dataProvider provideSubDirAppUrlParts */ + #[\PHPUnit\Framework\Attributes\DataProvider('provideSubDirAppUrlParts')] public function testLinkToSubDir($app, $file, $args, $expectedResult): void { \OC::$WEBROOT = '/nextcloud'; $result = $this->urlGenerator->linkTo($app, $file, $args); $this->assertEquals($expectedResult, $result); } - /** - * @dataProvider provideRoutes - */ + #[\PHPUnit\Framework\Attributes\DataProvider('provideRoutes')] public function testLinkToRouteAbsolute($route, $expected): void { $this->mockBaseUrl(); \OC::$WEBROOT = '/nextcloud'; @@ -135,8 +133,8 @@ class UrlGeneratorTest extends \Test\TestCase { /** * @small * test absolute URL construction - * @dataProvider provideDocRootURLs */ + #[\PHPUnit\Framework\Attributes\DataProvider('provideDocRootURLs')] public function testGetAbsoluteURLDocRoot($url, $expectedResult): void { $this->mockBaseUrl(); \OC::$WEBROOT = ''; @@ -147,8 +145,8 @@ class UrlGeneratorTest extends \Test\TestCase { /** * @small * test absolute URL construction - * @dataProvider provideSubDirURLs */ + #[\PHPUnit\Framework\Attributes\DataProvider('provideSubDirURLs')] public function testGetAbsoluteURLSubDir($url, $expectedResult): void { $this->mockBaseUrl(); \OC::$WEBROOT = '/nextcloud'; @@ -190,9 +188,7 @@ class UrlGeneratorTest extends \Test\TestCase { $this->assertEquals(\OC::$WEBROOT, $actual); } - /** - * @dataProvider provideOCSRoutes - */ + #[\PHPUnit\Framework\Attributes\DataProvider('provideOCSRoutes')] public function testLinkToOCSRouteAbsolute(string $route, bool $ignoreFrontController, string $expected): void { $this->mockBaseUrl(); \OC::$WEBROOT = '/nextcloud'; @@ -277,9 +273,7 @@ class UrlGeneratorTest extends \Test\TestCase { ]; } - /** - * @dataProvider imagePathProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('imagePathProvider')] public function testImagePath(string $appName, string $file, string $result): void { $this->assertSame($result, $this->urlGenerator->imagePath($appName, $file)); } |