Fix getMock Security

This commit is contained in:
Roeland Jago Douma 2016-09-07 20:20:08 +02:00
parent dc60f4c441
commit e1096c964d
No known key found for this signature in database
GPG Key ID: 1E152838F164D13B
2 changed files with 4 additions and 4 deletions

View 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,

View 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();