diff options
Diffstat (limited to 'tests/lib/App/AppStore/Fetcher/AppDiscoverFetcherTest.php')
-rw-r--r-- | tests/lib/App/AppStore/Fetcher/AppDiscoverFetcherTest.php | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/lib/App/AppStore/Fetcher/AppDiscoverFetcherTest.php b/tests/lib/App/AppStore/Fetcher/AppDiscoverFetcherTest.php index 82f40043971..b9866396662 100644 --- a/tests/lib/App/AppStore/Fetcher/AppDiscoverFetcherTest.php +++ b/tests/lib/App/AppStore/Fetcher/AppDiscoverFetcherTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -34,7 +35,7 @@ class AppDiscoverFetcherTest extends FetcherBase { ); } - public function testAppstoreDisabled() { + public function testAppstoreDisabled(): void { $this->config ->method('getSystemValueBool') ->willReturnCallback(function ($var, $default) { @@ -50,7 +51,7 @@ class AppDiscoverFetcherTest extends FetcherBase { $this->assertEquals([], $this->fetcher->get()); } - public function testNoInternet() { + public function testNoInternet(): void { $this->config ->method('getSystemValueBool') ->willReturnCallback(function ($var, $default) { @@ -71,10 +72,8 @@ class AppDiscoverFetcherTest extends FetcherBase { $this->assertEquals([], $this->fetcher->get()); } - /** - * @dataProvider dataGetETag - */ - public function testGetEtag(string|null $expected, bool $throws, string $content = '') { + #[\PHPUnit\Framework\Attributes\DataProvider('dataGetETag')] + public function testGetEtag(?string $expected, bool $throws, string $content = ''): void { $folder = $this->createMock(ISimpleFolder::class); if (!$throws) { $file = $this->createMock(ISimpleFile::class); @@ -104,7 +103,7 @@ class AppDiscoverFetcherTest extends FetcherBase { } } - public function dataGetETag(): array { + public static function dataGetETag(): array { return [ 'file not found' => [null, true], 'empty file' => [null, false, ''], |