diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-04-12 17:55:01 +0200 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2022-05-20 22:18:06 +0200 |
commit | b70c6a128fe5d0053b7971881696eafce4cb7c26 (patch) | |
tree | 641ff76531803c207a92d86f47d46b6dd93ab6d3 /tests/Core/Controller/LostControllerTest.php | |
parent | 2b0d82675f669f00ad90f2750b1832a60ec9f766 (diff) | |
download | nextcloud-server-b70c6a128fe5d0053b7971881696eafce4cb7c26.tar.gz nextcloud-server-b70c6a128fe5d0053b7971881696eafce4cb7c26.zip |
Update core to PHP 7.4 standard
- Typed properties
- Port to LoggerInterface
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'tests/Core/Controller/LostControllerTest.php')
-rw-r--r-- | tests/Core/Controller/LostControllerTest.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/Core/Controller/LostControllerTest.php b/tests/Core/Controller/LostControllerTest.php index e860c808014..8252e38b568 100644 --- a/tests/Core/Controller/LostControllerTest.php +++ b/tests/Core/Controller/LostControllerTest.php @@ -32,7 +32,6 @@ use OCP\Encryption\IManager; use OCP\IConfig; use OCP\IInitialStateService; use OCP\IL10N; -use OCP\ILogger; use OCP\IRequest; use OCP\IURLGenerator; use OCP\IUser; @@ -41,6 +40,7 @@ use OCP\Mail\IEMailTemplate; use OCP\Mail\IMailer; use OCP\Security\VerificationToken\InvalidTokenException; use OCP\Security\VerificationToken\IVerificationToken; +use Psr\Log\LoggerInterface; /** * Class LostControllerTest @@ -69,7 +69,7 @@ class LostControllerTest extends \Test\TestCase { private $encryptionManager; /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */ private $request; - /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */ + /** @var LoggerInterface|\PHPUnit\Framework\MockObject\MockObject */ private $logger; /** @var Manager|\PHPUnit\Framework\MockObject\MockObject */ private $twofactorManager; @@ -125,7 +125,7 @@ class LostControllerTest extends \Test\TestCase { $this->encryptionManager->expects($this->any()) ->method('isEnabled') ->willReturn(true); - $this->logger = $this->createMock(ILogger::class); + $this->logger = $this->createMock(LoggerInterface::class); $this->twofactorManager = $this->createMock(Manager::class); $this->initialStateService = $this->createMock(IInitialStateService::class); $this->verificationToken = $this->createMock(IVerificationToken::class); @@ -196,7 +196,7 @@ class LostControllerTest extends \Test\TestCase { ]); $this->logger->expects($this->exactly(0)) - ->method('logException'); + ->method('error'); $this->logger->expects($this->exactly(2)) ->method('warning'); @@ -397,7 +397,7 @@ class LostControllerTest extends \Test\TestCase { ->will($this->throwException(new \Exception())); $this->logger->expects($this->exactly(1)) - ->method('logException'); + ->method('error'); $response = $this->lostController->email('ExistingUser'); $expectedResponse = new JSONResponse(['status' => 'success']); @@ -549,7 +549,7 @@ class LostControllerTest extends \Test\TestCase { ->willReturn($user); $this->logger->expects($this->exactly(0)) - ->method('logException'); + ->method('error'); $this->logger->expects($this->once()) ->method('warning'); @@ -632,7 +632,7 @@ class LostControllerTest extends \Test\TestCase { ->willReturn([$user1, $user2]); $this->logger->expects($this->exactly(0)) - ->method('logException'); + ->method('error'); $this->logger->expects($this->once()) ->method('warning'); |