]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix getMock Security
authorRoeland Jago Douma <roeland@famdouma.nl>
Wed, 7 Sep 2016 18:20:08 +0000 (20:20 +0200)
committerRoeland Jago Douma <roeland@famdouma.nl>
Wed, 7 Sep 2016 18:42:38 +0000 (20:42 +0200)
tests/lib/Security/Bruteforce/ThrottlerTest.php
tests/lib/Security/CredentialsManagerTest.php

index 9b7a47ceec89b79ccd866c3d1f75a2a5e7cb8d2e..604aecd3a65b1aa6d9887bd24d1068d006f47c38 100644 (file)
@@ -44,9 +44,9 @@ class ThrottlerTest extends TestCase {
        private $config;
 
        public function setUp() {
-               $this->dbConnection = $this->getMock('\OCP\IDBConnection');
-               $this->logger = $this->getMock('\OCP\ILogger');
-               $this->config = $this->getMock('\OCP\IConfig');
+               $this->dbConnection = $this->createMock(IDBConnection::class);
+               $this->logger = $this->createMock(ILogger::class);
+               $this->config = $this->createMock(IConfig::class);
 
                $this->throttler = new Throttler(
                        $this->dbConnection,
index 7eb4e4d7b1a35b68668a91d301c04cb807ccc5e5..cffcc02817cd6f77f49a0f445abbb38a52621776 100644 (file)
@@ -38,7 +38,7 @@ class CredentialsManagerTest extends \Test\TestCase {
 
        protected function setUp() {
                parent::setUp();
-               $this->crypto = $this->getMock('\OCP\Security\ICrypto');
+               $this->crypto = $this->createMock(ICrypto::class);
                $this->dbConnection = $this->getMockBuilder('\OC\DB\Connection')
                        ->disableOriginalConstructor()
                        ->getMock();