diff options
Diffstat (limited to 'tests/lib/App/AppStore/Fetcher/AppDiscoverFetcherTest.php')
-rw-r--r-- | tests/lib/App/AppStore/Fetcher/AppDiscoverFetcherTest.php | 34 |
1 files changed, 8 insertions, 26 deletions
diff --git a/tests/lib/App/AppStore/Fetcher/AppDiscoverFetcherTest.php b/tests/lib/App/AppStore/Fetcher/AppDiscoverFetcherTest.php index b45a014ead1..b9866396662 100644 --- a/tests/lib/App/AppStore/Fetcher/AppDiscoverFetcherTest.php +++ b/tests/lib/App/AppStore/Fetcher/AppDiscoverFetcherTest.php @@ -1,24 +1,8 @@ <?php + /** - * @copyright Copyright (c) 2024 Ferdinand Thiessen <opensource@fthiessen.de> - * - * @author Ferdinand Thiessen <opensource@fthiessen.de> - * - * @license AGPL-3.0-or-later - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * + * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later */ namespace Test\App\AppStore\Fetcher; @@ -51,7 +35,7 @@ class AppDiscoverFetcherTest extends FetcherBase { ); } - public function testAppstoreDisabled() { + public function testAppstoreDisabled(): void { $this->config ->method('getSystemValueBool') ->willReturnCallback(function ($var, $default) { @@ -67,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) { @@ -88,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); @@ -121,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, ''], |