Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/tests/unit')
-rw-r--r--apps/dav/tests/unit/BackgroundJob/CleanupInvitationTokenJobTest.php6
-rw-r--r--apps/dav/tests/unit/Controller/InvitationResponseControllerTest.php6
2 files changed, 8 insertions, 4 deletions
diff --git a/apps/dav/tests/unit/BackgroundJob/CleanupInvitationTokenJobTest.php b/apps/dav/tests/unit/BackgroundJob/CleanupInvitationTokenJobTest.php
index 6233980edbb..8f1a2a1378f 100644
--- a/apps/dav/tests/unit/BackgroundJob/CleanupInvitationTokenJobTest.php
+++ b/apps/dav/tests/unit/BackgroundJob/CleanupInvitationTokenJobTest.php
@@ -32,6 +32,7 @@ namespace OCA\DAV\Tests\unit\BackgroundJob;
use OCA\DAV\BackgroundJob\CleanupInvitationTokenJob;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\DB\QueryBuilder\IQueryBuilder;
+use OCP\DB\QueryBuilder\IQueryFunction;
use OCP\IDBConnection;
use Test\TestCase;
@@ -77,10 +78,11 @@ class CleanupInvitationTokenJobTest extends TestCase {
[1337, \PDO::PARAM_STR, null, 'namedParameter1337']
]);
+ $function = $this->createMock(IQueryFunction::class);
$expr->expects($this->once())
->method('lt')
->with('expiration', 'namedParameter1337')
- ->willReturn('LT STATEMENT');
+ ->willReturn($function);
$this->dbConnection->expects($this->once())
->method('getQueryBuilder')
@@ -93,7 +95,7 @@ class CleanupInvitationTokenJobTest extends TestCase {
->willReturn($queryBuilder);
$queryBuilder->expects($this->at(3))
->method('where')
- ->with('LT STATEMENT')
+ ->with($function)
->willReturn($queryBuilder);
$queryBuilder->expects($this->at(4))
->method('execute')
diff --git a/apps/dav/tests/unit/Controller/InvitationResponseControllerTest.php b/apps/dav/tests/unit/Controller/InvitationResponseControllerTest.php
index cd3269d657c..576fde2d4af 100644
--- a/apps/dav/tests/unit/Controller/InvitationResponseControllerTest.php
+++ b/apps/dav/tests/unit/Controller/InvitationResponseControllerTest.php
@@ -37,6 +37,7 @@ use OCP\AppFramework\Utility\ITimeFactory;
use OCP\DB\IResult;
use OCP\DB\QueryBuilder\IExpressionBuilder;
use OCP\DB\QueryBuilder\IQueryBuilder;
+use OCP\DB\QueryBuilder\IQueryFunction;
use OCP\IDBConnection;
use OCP\IRequest;
use Sabre\VObject\ITip\Message;
@@ -477,10 +478,11 @@ EOF;
->with(\PDO::FETCH_ASSOC)
->willReturn($return);
+ $function = $this->createMock(IQueryFunction::class);
$expr->expects($this->once())
->method('eq')
->with('token', 'namedParameterToken')
- ->willReturn('EQ STATEMENT');
+ ->willReturn($function);
$this->dbConnection->expects($this->once())
->method('getQueryBuilder')
@@ -497,7 +499,7 @@ EOF;
->willReturn($queryBuilder);
$queryBuilder->expects($this->at(4))
->method('where')
- ->with('EQ STATEMENT')
+ ->with($function)
->willReturn($queryBuilder);
$queryBuilder->expects($this->at(5))
->method('execute')