aboutsummaryrefslogtreecommitdiffstats
path: root/tests/Core/Controller
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2025-06-30 16:56:59 +0200
committerRobin Appelman <robin@icewind.nl>2025-07-01 22:45:52 +0200
commitaa15f9d16d5b46d04763c7deedb129990e819364 (patch)
tree758e0aebcac34a545f9a21806120a9fcb96f4cb6 /tests/Core/Controller
parent1620a0c0510a42b1da0a66488838f1ce3ba1210d (diff)
downloadnextcloud-server-rector-phpunit10.tar.gz
nextcloud-server-rector-phpunit10.zip
chore: run rectorrector-phpunit10
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'tests/Core/Controller')
-rw-r--r--tests/Core/Controller/AutoCompleteControllerTest.php4
-rw-r--r--tests/Core/Controller/ClientFlowLoginControllerTest.php2
-rw-r--r--tests/Core/Controller/GuestAvatarControllerTest.php3
-rw-r--r--tests/Core/Controller/LoginControllerTest.php4
-rw-r--r--tests/Core/Controller/LostControllerTest.php2
-rw-r--r--tests/Core/Controller/NavigationControllerTest.php4
-rw-r--r--tests/Core/Controller/WipeControllerTest.php6
7 files changed, 10 insertions, 15 deletions
diff --git a/tests/Core/Controller/AutoCompleteControllerTest.php b/tests/Core/Controller/AutoCompleteControllerTest.php
index 4af1feafad9..c5574f78fc1 100644
--- a/tests/Core/Controller/AutoCompleteControllerTest.php
+++ b/tests/Core/Controller/AutoCompleteControllerTest.php
@@ -154,9 +154,7 @@ class AutoCompleteControllerTest extends TestCase {
];
}
- /**
- * @dataProvider searchDataProvider
- */
+ #[\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')
diff --git a/tests/Core/Controller/ClientFlowLoginControllerTest.php b/tests/Core/Controller/ClientFlowLoginControllerTest.php
index 597c6641706..b182bb1bb39 100644
--- a/tests/Core/Controller/ClientFlowLoginControllerTest.php
+++ b/tests/Core/Controller/ClientFlowLoginControllerTest.php
@@ -603,11 +603,11 @@ class ClientFlowLoginControllerTest extends TestCase {
}
/**
- * @dataProvider dataGeneratePasswordWithHttpsProxy
* @param array $headers
* @param string $protocol
* @param string $expected
*/
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataGeneratePasswordWithHttpsProxy')]
public function testGeneratePasswordWithHttpsProxy(array $headers, $protocol, $expected): void {
$this->session
->expects($this->once())
diff --git a/tests/Core/Controller/GuestAvatarControllerTest.php b/tests/Core/Controller/GuestAvatarControllerTest.php
index 3e66cc8bad2..66a83098130 100644
--- a/tests/Core/Controller/GuestAvatarControllerTest.php
+++ b/tests/Core/Controller/GuestAvatarControllerTest.php
@@ -8,6 +8,7 @@ namespace Core\Controller;
use OC\Core\Controller\GuestAvatarController;
use OCP\AppFramework\Http\FileDisplayResponse;
+use OCP\Files\File;
use OCP\Files\SimpleFS\ISimpleFile;
use OCP\IAvatar;
use OCP\IAvatarManager;
@@ -39,7 +40,7 @@ class GuestAvatarControllerTest extends \Test\TestCase {
private $avatar;
/**
- * @var \OCP\Files\File|\PHPUnit\Framework\MockObject\MockObject
+ * @var File|\PHPUnit\Framework\MockObject\MockObject
*/
private $file;
diff --git a/tests/Core/Controller/LoginControllerTest.php b/tests/Core/Controller/LoginControllerTest.php
index 6dcf4771f7e..18baaf5b08c 100644
--- a/tests/Core/Controller/LoginControllerTest.php
+++ b/tests/Core/Controller/LoginControllerTest.php
@@ -351,9 +351,7 @@ class LoginControllerTest extends TestCase {
];
}
- /**
- * @dataProvider passwordResetDataProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('passwordResetDataProvider')]
public function testShowLoginFormWithPasswordResetOption($canChangePassword,
$expectedResult): void {
$this->userSession
diff --git a/tests/Core/Controller/LostControllerTest.php b/tests/Core/Controller/LostControllerTest.php
index 84b6fb78a8f..bbb5f2c2e54 100644
--- a/tests/Core/Controller/LostControllerTest.php
+++ b/tests/Core/Controller/LostControllerTest.php
@@ -687,10 +687,10 @@ class LostControllerTest extends TestCase {
}
/**
- * @dataProvider dataTwoUsersWithSameEmailOneDisabled
* @param bool $userEnabled1
* @param bool $userEnabled2
*/
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataTwoUsersWithSameEmailOneDisabled')]
public function testTwoUsersWithSameEmailOneDisabled(bool $userEnabled1, bool $userEnabled2): void {
$user1 = $this->createMock(IUser::class);
$user1->method('getEMailAddress')
diff --git a/tests/Core/Controller/NavigationControllerTest.php b/tests/Core/Controller/NavigationControllerTest.php
index f7ce5bedef7..d00976f18ec 100644
--- a/tests/Core/Controller/NavigationControllerTest.php
+++ b/tests/Core/Controller/NavigationControllerTest.php
@@ -48,7 +48,7 @@ class NavigationControllerTest extends TestCase {
[true],
];
}
- /** @dataProvider dataGetNavigation */
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataGetNavigation')]
public function testGetAppNavigation(bool $absolute): void {
$this->navigationManager->expects($this->once())
->method('getAll')
@@ -76,7 +76,7 @@ class NavigationControllerTest extends TestCase {
}
}
- /** @dataProvider dataGetNavigation */
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataGetNavigation')]
public function testGetSettingsNavigation(bool $absolute): void {
$this->navigationManager->expects($this->once())
->method('getAll')
diff --git a/tests/Core/Controller/WipeControllerTest.php b/tests/Core/Controller/WipeControllerTest.php
index fa5f98988e7..5330eb599e6 100644
--- a/tests/Core/Controller/WipeControllerTest.php
+++ b/tests/Core/Controller/WipeControllerTest.php
@@ -47,9 +47,8 @@ class WipeControllerTest extends TestCase {
* @param bool $valid
* @param bool $couldPerform
* @param bool $result
- *
- * @dataProvider dataTest
*/
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataTest')]
public function testCheckWipe(bool $valid, bool $couldPerform, bool $result): void {
if (!$valid) {
$this->remoteWipe->method('start')
@@ -76,9 +75,8 @@ class WipeControllerTest extends TestCase {
* @param bool $valid
* @param bool $couldPerform
* @param bool $result
- *
- * @dataProvider dataTest
*/
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataTest')]
public function testWipeDone(bool $valid, bool $couldPerform, bool $result): void {
if (!$valid) {
$this->remoteWipe->method('finish')