diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2021-01-03 15:28:31 +0100 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2021-01-08 11:45:19 +0100 |
commit | 8b64e92b9262d2a2eec6345685ce421050f95c66 (patch) | |
tree | dd51490b8a184b2643414d11867a9fa450aa5065 /tests/lib/Security | |
parent | 84e6e9f7cf19207041925eaa237d24e1c12c2c2d (diff) | |
download | nextcloud-server-8b64e92b9262d2a2eec6345685ce421050f95c66.tar.gz nextcloud-server-8b64e92b9262d2a2eec6345685ce421050f95c66.zip |
Bump doctrine/dbal from 2.12.0 to 3.0.0
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'tests/lib/Security')
-rw-r--r-- | tests/lib/Security/CredentialsManagerTest.php | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/tests/lib/Security/CredentialsManagerTest.php b/tests/lib/Security/CredentialsManagerTest.php index 9c1a0cb9291..3ce80227f44 100644 --- a/tests/lib/Security/CredentialsManagerTest.php +++ b/tests/lib/Security/CredentialsManagerTest.php @@ -21,6 +21,7 @@ namespace Test\Security; +use OC\DB\ConnectionAdapter; use OC\Security\CredentialsManager; use OC\SystemConfig; use OCP\IDBConnection; @@ -38,13 +39,19 @@ class CredentialsManagerTest extends \Test\TestCase { /** @var IDBConnection */ protected $dbConnection; + /** @var ConnectionAdapter */ + protected $dbConnectionAdapter; + /** @var CredentialsManager */ protected $manager; protected function setUp(): void { parent::setUp(); $this->crypto = $this->createMock(ICrypto::class); - $this->dbConnection = $this->getMockBuilder('\OC\DB\Connection') + $this->dbConnection = $this->getMockBuilder(IDBConnection::class) + ->disableOriginalConstructor() + ->getMock(); + $this->dbConnectionAdapter = $this->getMockBuilder(ConnectionAdapter::class) ->disableOriginalConstructor() ->getMock(); $this->manager = new CredentialsManager($this->crypto, $this->dbConnection); @@ -91,9 +98,9 @@ class CredentialsManagerTest extends \Test\TestCase { ->with('baz') ->willReturn(json_encode('bar')); - $qb = $this->getMockBuilder('\OC\DB\QueryBuilder\QueryBuilder') + $qb = $this->getMockBuilder(\OC\DB\QueryBuilder\QueryBuilder::class) ->setConstructorArgs([ - $this->dbConnection, + $this->dbConnectionAdapter, $this->createMock(SystemConfig::class), $this->createMock(ILogger::class), ]) @@ -103,7 +110,7 @@ class CredentialsManagerTest extends \Test\TestCase { ->method('execute') ->willReturn($this->getQueryResult(['credentials' => 'baz'])); - $this->dbConnection->expects($this->once()) + $this->dbConnectionAdapter->expects($this->once()) ->method('getQueryBuilder') ->willReturn($qb); |