diff options
Diffstat (limited to 'tests/Core/Controller/AutoCompleteControllerTest.php')
-rw-r--r-- | tests/Core/Controller/AutoCompleteControllerTest.php | 38 |
1 files changed, 10 insertions, 28 deletions
diff --git a/tests/Core/Controller/AutoCompleteControllerTest.php b/tests/Core/Controller/AutoCompleteControllerTest.php index 6b2f9a4f163..c5574f78fc1 100644 --- a/tests/Core/Controller/AutoCompleteControllerTest.php +++ b/tests/Core/Controller/AutoCompleteControllerTest.php @@ -1,24 +1,8 @@ <?php + /** - * @copyright Copyright (c) 2017 Arthur Schiwon <blizzz@arthur-schiwon.de> - * - * @author Arthur Schiwon <blizzz@arthur-schiwon.de> - * - * @license GNU AGPL version 3 or any later version - * - * 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: 2017 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later */ namespace Tests\Core\Controller; @@ -32,13 +16,13 @@ use PHPUnit\Framework\MockObject\MockObject; use Test\TestCase; class AutoCompleteControllerTest extends TestCase { - /** @var ISearch|MockObject */ + /** @var ISearch|MockObject */ protected $collaboratorSearch; - /** @var IManager|MockObject */ + /** @var IManager|MockObject */ protected $autoCompleteManager; - /** @var IEventDispatcher|MockObject */ + /** @var IEventDispatcher|MockObject */ protected $dispatcher; - /** @var AutoCompleteController */ + /** @var AutoCompleteController */ protected $controller; protected function setUp(): void { @@ -59,7 +43,7 @@ class AutoCompleteControllerTest extends TestCase { ); } - public function searchDataProvider() { + public static function searchDataProvider(): array { return [ [ #0 – regular search // searchResults @@ -170,10 +154,8 @@ class AutoCompleteControllerTest extends TestCase { ]; } - /** - * @dataProvider searchDataProvider - */ - public function testGet(array $searchResults, array $expected, string $searchTerm, ?string $itemType, ?string $itemId, ?string $sorter) { + #[\PHPUnit\Framework\Attributes\DataProvider('searchDataProvider')] + public function testGet(array $searchResults, array $expected, string $searchTerm, ?string $itemType, ?string $itemId, ?string $sorter): void { $this->collaboratorSearch->expects($this->once()) ->method('search') ->willReturn([$searchResults, false]); |