Merge pull request #26662 from nextcloud/bugfix/noid/fix-dav-unit-tests
Fix DAV unit tests
This commit is contained in:
commit
1e767b4f44
|
@ -437,7 +437,8 @@ EOD;
|
|||
->with('Busy')
|
||||
->willReturn("Translated busy");
|
||||
} else {
|
||||
$l10n->expects($this->never());
|
||||
$l10n->expects($this->never())
|
||||
->method('t');
|
||||
}
|
||||
$c = new Calendar($backend, $calendarInfo, $l10n, $this->config);
|
||||
|
||||
|
|
|
@ -34,6 +34,8 @@ use OCA\DAV\CalDAV\InvitationResponse\InvitationResponseServer;
|
|||
use OCA\DAV\Controller\InvitationResponseController;
|
||||
use OCP\AppFramework\Http\TemplateResponse;
|
||||
use OCP\AppFramework\Utility\ITimeFactory;
|
||||
use OCP\DB\IResult;
|
||||
use OCP\DB\QueryBuilder\IExpressionBuilder;
|
||||
use OCP\DB\QueryBuilder\IQueryBuilder;
|
||||
use OCP\IDBConnection;
|
||||
use OCP\IRequest;
|
||||
|
@ -408,8 +410,8 @@ EOF;
|
|||
|
||||
private function buildQueryExpects($token, $return, $time) {
|
||||
$queryBuilder = $this->createMock(IQueryBuilder::class);
|
||||
$stmt = $this->createMock(\Doctrine\DBAL\Driver\Statement::class);
|
||||
$expr = $this->createMock(\OCP\DB\QueryBuilder\IExpressionBuilder::class);
|
||||
$stmt = $this->createMock(IResult::class);
|
||||
$expr = $this->createMock(IExpressionBuilder::class);
|
||||
|
||||
$this->dbConnection->expects($this->once())
|
||||
->method('getQueryBuilder')
|
||||
|
|
|
@ -29,6 +29,7 @@ namespace OCA\DAV\Tests\unit\DAV\Migration;
|
|||
use OCA\DAV\BackgroundJob\RefreshWebcalJob;
|
||||
use OCA\DAV\Migration\RefreshWebcalJobRegistrar;
|
||||
use OCP\BackgroundJob\IJobList;
|
||||
use OCP\DB\IResult;
|
||||
use OCP\DB\QueryBuilder\IQueryBuilder;
|
||||
use OCP\IDBConnection;
|
||||
use OCP\Migration\IOutput;
|
||||
|
@ -62,7 +63,7 @@ class RefreshWebcalJobRegistrarTest extends TestCase {
|
|||
$output = $this->createMock(IOutput::class);
|
||||
|
||||
$queryBuilder = $this->createMock(IQueryBuilder::class);
|
||||
$statement = $this->createMock(\Doctrine\DBAL\Driver\Statement::class);
|
||||
$statement = $this->createMock(IResult::class);
|
||||
|
||||
$this->db->expects($this->once())
|
||||
->method('getQueryBuilder')
|
||||
|
|
Loading…
Reference in New Issue