diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-03-21 11:17:14 +0100 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-03-24 16:21:26 +0100 |
commit | 61f7f13bd81948f6179bb8f70b6711c002ddd70e (patch) | |
tree | f1238dd97d93203637bb203d4cf649b65c8fbc4a /tests/lib/Security | |
parent | e8c1f75064ae008e50daa087924de5d29368747e (diff) | |
download | nextcloud-server-61f7f13bd81948f6179bb8f70b6711c002ddd70e.tar.gz nextcloud-server-61f7f13bd81948f6179bb8f70b6711c002ddd70e.zip |
Migrate from ILogger to LoggerInterface where needed in the tests
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'tests/lib/Security')
-rw-r--r-- | tests/lib/Security/Bruteforce/ThrottlerTest.php | 6 | ||||
-rw-r--r-- | tests/lib/Security/CertificateManagerTest.php | 6 | ||||
-rw-r--r-- | tests/lib/Security/IdentityProof/ManagerTest.php | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/tests/lib/Security/Bruteforce/ThrottlerTest.php b/tests/lib/Security/Bruteforce/ThrottlerTest.php index fb28a7c9c7a..6639f884ae1 100644 --- a/tests/lib/Security/Bruteforce/ThrottlerTest.php +++ b/tests/lib/Security/Bruteforce/ThrottlerTest.php @@ -28,7 +28,7 @@ use OC\AppFramework\Utility\TimeFactory; use OC\Security\Bruteforce\Throttler; use OCP\IConfig; use OCP\IDBConnection; -use OCP\ILogger; +use Psr\Log\LoggerInterface; use Test\TestCase; /** @@ -42,14 +42,14 @@ class ThrottlerTest extends TestCase { private $throttler; /** @var IDBConnection */ private $dbConnection; - /** @var ILogger */ + /** @var LoggerInterface */ private $logger; /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */ private $config; protected function setUp(): void { $this->dbConnection = $this->createMock(IDBConnection::class); - $this->logger = $this->createMock(ILogger::class); + $this->logger = $this->createMock(LoggerInterface::class); $this->config = $this->createMock(IConfig::class); $this->throttler = new Throttler( diff --git a/tests/lib/Security/CertificateManagerTest.php b/tests/lib/Security/CertificateManagerTest.php index c50296c2a33..b1659d1096d 100644 --- a/tests/lib/Security/CertificateManagerTest.php +++ b/tests/lib/Security/CertificateManagerTest.php @@ -14,8 +14,8 @@ namespace Test\Security; use OC\Files\View; use OC\Security\CertificateManager; use OCP\IConfig; -use OCP\ILogger; use OCP\Security\ISecureRandom; +use Psr\Log\LoggerInterface; /** * Class CertificateManagerTest @@ -58,7 +58,7 @@ class CertificateManagerTest extends \Test\TestCase { $this->certificateManager = new CertificateManager( new \OC\Files\View(), $config, - $this->createMock(ILogger::class), + $this->createMock(LoggerInterface::class), $this->random ); } @@ -156,7 +156,7 @@ class CertificateManagerTest extends \Test\TestCase { /** @var CertificateManager | \PHPUnit\Framework\MockObject\MockObject $certificateManager */ $certificateManager = $this->getMockBuilder('OC\Security\CertificateManager') - ->setConstructorArgs([$view, $config, $this->createMock(ILogger::class), $this->random]) + ->setConstructorArgs([$view, $config, $this->createMock(LoggerInterface::class), $this->random]) ->setMethods(['getFilemtimeOfCaBundle', 'getCertificateBundle']) ->getMock(); diff --git a/tests/lib/Security/IdentityProof/ManagerTest.php b/tests/lib/Security/IdentityProof/ManagerTest.php index 0a6f97f3fcd..968cfa633ca 100644 --- a/tests/lib/Security/IdentityProof/ManagerTest.php +++ b/tests/lib/Security/IdentityProof/ManagerTest.php @@ -32,10 +32,10 @@ use OCP\Files\IAppData; use OCP\Files\SimpleFS\ISimpleFile; use OCP\Files\SimpleFS\ISimpleFolder; use OCP\IConfig; -use OCP\ILogger; use OCP\IUser; use OCP\Security\ICrypto; use PHPUnit\Framework\MockObject\MockObject; +use Psr\Log\LoggerInterface; use Test\TestCase; class ManagerTest extends TestCase { @@ -49,7 +49,7 @@ class ManagerTest extends TestCase { private $manager; /** @var IConfig|MockObject */ private $config; - /** @var ILogger|MockObject */ + /** @var LoggerInterface|MockObject */ private $logger; protected function setUp(): void { @@ -63,7 +63,7 @@ class ManagerTest extends TestCase { ->method('get') ->with('identityproof') ->willReturn($this->appData); - $this->logger = $this->createMock(ILogger::class); + $this->logger = $this->createMock(LoggerInterface::class); $this->crypto = $this->createMock(ICrypto::class); $this->manager = $this->getManager(['generateKeyPair']); |