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