diff options
author | Robin Appelman <robin@icewind.nl> | 2025-06-30 16:56:59 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2025-07-01 22:45:52 +0200 |
commit | aa15f9d16d5b46d04763c7deedb129990e819364 (patch) | |
tree | 758e0aebcac34a545f9a21806120a9fcb96f4cb6 /apps/user_ldap/tests/Jobs/SyncTest.php | |
parent | 1620a0c0510a42b1da0a66488838f1ce3ba1210d (diff) | |
download | nextcloud-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 'apps/user_ldap/tests/Jobs/SyncTest.php')
-rw-r--r-- | apps/user_ldap/tests/Jobs/SyncTest.php | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/apps/user_ldap/tests/Jobs/SyncTest.php b/apps/user_ldap/tests/Jobs/SyncTest.php index 20489ea0901..f6ecf984ab0 100644 --- a/apps/user_ldap/tests/Jobs/SyncTest.php +++ b/apps/user_ldap/tests/Jobs/SyncTest.php @@ -102,9 +102,7 @@ class SyncTest extends TestCase { ]; } - /** - * @dataProvider intervalDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('intervalDataProvider')] public function testUpdateInterval(int $userCount, int $pagingSize1, int $pagingSize2): void { $this->config->expects($this->once()) ->method('setAppValue') @@ -145,9 +143,7 @@ class SyncTest extends TestCase { ]; } - /** - * @dataProvider moreResultsProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('moreResultsProvider')] public function testMoreResults($pagingSize, $results, $expected): void { $connection = $this->getMockBuilder(Connection::class) ->setConstructorArgs([ @@ -204,9 +200,7 @@ class SyncTest extends TestCase { ]; } - /** - * @dataProvider cycleDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('cycleDataProvider')] public function testDetermineNextCycle(?array $cycleData, array $prefixes, ?array $expectedCycle): void { $this->helper->expects($this->any()) ->method('getServerConfigurationPrefixes') @@ -220,7 +214,7 @@ class SyncTest extends TestCase { ]; $this->config->expects($this->exactly(2)) ->method('setAppValue') - ->willReturnCallback(function () use (&$calls) { + ->willReturnCallback(function () use (&$calls): void { $expected = array_shift($calls); $this->assertEquals($expected, func_get_args()); }); @@ -284,9 +278,7 @@ class SyncTest extends TestCase { ]; } - /** - * @dataProvider runDataProvider - */ + #[\PHPUnit\Framework\Attributes\DataProvider('runDataProvider')] public function testRun(array $runData): void { $this->config->expects($this->any()) ->method('getAppValue') @@ -322,7 +314,7 @@ class SyncTest extends TestCase { ]; $this->config->expects($this->exactly(3)) ->method('setAppValue') - ->willReturnCallback(function () use (&$calls) { + ->willReturnCallback(function () use (&$calls): void { $expected = array_shift($calls); $this->assertEquals($expected, func_get_args()); }); |