diff options
Diffstat (limited to 'tests/Core/Controller/LostControllerTest.php')
-rw-r--r-- | tests/Core/Controller/LostControllerTest.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/Core/Controller/LostControllerTest.php b/tests/Core/Controller/LostControllerTest.php index ffe3eb3920d..bbb5f2c2e54 100644 --- a/tests/Core/Controller/LostControllerTest.php +++ b/tests/Core/Controller/LostControllerTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only @@ -180,7 +181,7 @@ class LostControllerTest extends TestCase { $this->initialState ->expects($this->exactly(2)) ->method('provideInitialState') - ->willReturnCallback(function () use (&$calls) { + ->willReturnCallback(function () use (&$calls): void { $expected = array_shift($calls); $this->assertEquals($expected, func_get_args()); }); @@ -403,7 +404,7 @@ class LostControllerTest extends TestCase { ->expects($this->once()) ->method('send') ->with($message) - ->will($this->throwException(new \Exception())); + ->willThrowException(new \Exception()); $this->logger->expects($this->exactly(1)) ->method('error'); @@ -461,7 +462,7 @@ class LostControllerTest extends TestCase { $this->eventDispatcher ->expects($this->exactly(2)) ->method('dispatchTyped') - ->willReturnCallback(function () use (&$calls) { + ->willReturnCallback(function () use (&$calls): void { $expected = array_shift($calls); $this->assertEquals($expected, func_get_args()); }); @@ -686,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') |