diff options
Diffstat (limited to 'tests/lib/Updater/ChangesCheckTest.php')
-rw-r--r-- | tests/lib/Updater/ChangesCheckTest.php | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/tests/lib/Updater/ChangesCheckTest.php b/tests/lib/Updater/ChangesCheckTest.php index 6b5b306d8f7..dd0d97a9e80 100644 --- a/tests/lib/Updater/ChangesCheckTest.php +++ b/tests/lib/Updater/ChangesCheckTest.php @@ -51,9 +51,7 @@ class ChangesCheckTest extends TestCase { ]; } - /** - * @dataProvider statusCodeProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('statusCodeProvider')] public function testEvaluateResponse(int $statusCode, int $expected): void { $response = $this->createMock(IResponse::class); $response->expects($this->atLeastOnce()) @@ -271,9 +269,7 @@ class ChangesCheckTest extends TestCase { ]; } - /** - * @dataProvider changesXMLProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('changesXMLProvider')] public function testExtractData(string $body, array $expected): void { $actual = $this->invokePrivate($this->checker, 'extractData', [$body]); $this->assertSame($expected, $actual); @@ -286,9 +282,7 @@ class ChangesCheckTest extends TestCase { ]; } - /** - * @dataProvider etagProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('etagProvider')] public function testQueryChangesServer(string $etag): void { $uri = 'https://changes.nextcloud.server/?13.0.5'; $entry = $this->createMock(Changes::class); @@ -323,9 +317,7 @@ class ChangesCheckTest extends TestCase { ]; } - /** - * @dataProvider versionProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('versionProvider')] public function testNormalizeVersion(string $input, string $expected): void { $normalized = $this->checker->normalizeVersion($input); $this->assertSame($expected, $normalized); @@ -342,10 +334,7 @@ class ChangesCheckTest extends TestCase { return array_merge($testDataFound, $testDataNotFound); } - /** - * @dataProvider changeDataProvider - * - */ + #[\PHPUnit\Framework\Attributes\DataProvider('changeDataProvider')] public function testGetChangesForVersion(string $inputVersion, string $normalizedVersion, bool $isFound): void { $mocker = $this->mapper->expects($this->once()) ->method('getChanges') |