diff options
author | Joas Schilling <coding@schilljs.com> | 2020-10-13 16:33:53 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-10-20 17:41:47 +0200 |
commit | 4bc821edd95a6b71dd99f75632f432d5ccf2853f (patch) | |
tree | d6fd460718df9da42b369d1a1f85200517a49bae /tests/lib/Accounts | |
parent | 851e8c0ded27a6cf8d18f6cf42f2473a6fe2aa8c (diff) | |
download | nextcloud-server-4bc821edd95a6b71dd99f75632f432d5ccf2853f.tar.gz nextcloud-server-4bc821edd95a6b71dd99f75632f432d5ccf2853f.zip |
PSR logger for accounts
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests/lib/Accounts')
-rw-r--r-- | tests/lib/Accounts/AccountsManagerTest.php | 6 | ||||
-rw-r--r-- | tests/lib/Accounts/HooksTest.php | 11 |
2 files changed, 9 insertions, 8 deletions
diff --git a/tests/lib/Accounts/AccountsManagerTest.php b/tests/lib/Accounts/AccountsManagerTest.php index 76abeb5b495..de9cc706b6a 100644 --- a/tests/lib/Accounts/AccountsManagerTest.php +++ b/tests/lib/Accounts/AccountsManagerTest.php @@ -25,9 +25,9 @@ use OC\Accounts\Account; use OC\Accounts\AccountManager; use OCP\Accounts\IAccountManager; use OCP\BackgroundJob\IJobList; -use OCP\ILogger; use OCP\IUser; use PHPUnit\Framework\MockObject\MockObject; +use Psr\Log\LoggerInterface; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\EventDispatcher\GenericEvent; use Test\TestCase; @@ -52,7 +52,7 @@ class AccountsManagerTest extends TestCase { /** @var string accounts table name */ private $table = 'accounts'; - /** @var ILogger|MockObject */ + /** @var LoggerInterface|MockObject */ private $logger; protected function setUp(): void { @@ -60,7 +60,7 @@ class AccountsManagerTest extends TestCase { $this->eventDispatcher = $this->createMock(EventDispatcherInterface::class); $this->connection = \OC::$server->getDatabaseConnection(); $this->jobList = $this->createMock(IJobList::class); - $this->logger = $this->createMock(ILogger::class); + $this->logger = $this->createMock(LoggerInterface::class); } protected function tearDown(): void { diff --git a/tests/lib/Accounts/HooksTest.php b/tests/lib/Accounts/HooksTest.php index d24afd475e4..39003b2ef23 100644 --- a/tests/lib/Accounts/HooksTest.php +++ b/tests/lib/Accounts/HooksTest.php @@ -23,8 +23,9 @@ namespace Test\Accounts; use OC\Accounts\AccountManager; use OC\Accounts\Hooks; -use OCP\ILogger; use OCP\IUser; +use PHPUnit\Framework\MockObject\MockObject; +use Psr\Log\LoggerInterface; use Test\TestCase; /** @@ -35,19 +36,19 @@ use Test\TestCase; */ class HooksTest extends TestCase { - /** @var ILogger | \PHPUnit\Framework\MockObject\MockObject */ + /** @var LoggerInterface|MockObject */ private $logger; - /** @var AccountManager | \PHPUnit\Framework\MockObject\MockObject */ + /** @var AccountManager|MockObject */ private $accountManager; - /** @var Hooks | \PHPUnit\Framework\MockObject\MockObject */ + /** @var Hooks|MockObject */ private $hooks; protected function setUp(): void { parent::setUp(); - $this->logger = $this->createMock(ILogger::class); + $this->logger = $this->createMock(LoggerInterface::class); $this->accountManager = $this->getMockBuilder(AccountManager::class) ->disableOriginalConstructor()->getMock(); |