aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2024-07-04 11:26:17 +0200
committerJoas Schilling <coding@schilljs.com>2024-07-19 11:21:16 +0200
commiteeb6ddb176adc7488b74d004dceafee960603ebc (patch)
tree50c3bf5d7d1df99c9ea661f68eaded03b6dac3f4 /tests/lib
parente45465781f1d9d6d64501dee46c8f4b4704e5918 (diff)
downloadnextcloud-server-eeb6ddb176adc7488b74d004dceafee960603ebc.tar.gz
nextcloud-server-eeb6ddb176adc7488b74d004dceafee960603ebc.zip
fix(db): Deprecate `IExpressionBuilder::or()` and `IExpressionBuilder::and()` without parameters
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests/lib')
-rw-r--r--tests/lib/DB/QueryBuilder/ExpressionBuilderTest.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/lib/DB/QueryBuilder/ExpressionBuilderTest.php b/tests/lib/DB/QueryBuilder/ExpressionBuilderTest.php
index d8147035b16..5c9482419d9 100644
--- a/tests/lib/DB/QueryBuilder/ExpressionBuilderTest.php
+++ b/tests/lib/DB/QueryBuilder/ExpressionBuilderTest.php
@@ -10,6 +10,7 @@ namespace Test\DB\QueryBuilder;
use Doctrine\DBAL\Query\Expression\ExpressionBuilder as DoctrineExpressionBuilder;
use OC\DB\QueryBuilder\ExpressionBuilder\ExpressionBuilder;
use OCP\DB\QueryBuilder\IQueryBuilder;
+use Psr\Log\LoggerInterface;
use Test\TestCase;
/**
@@ -32,15 +33,19 @@ class ExpressionBuilderTest extends TestCase {
/** @var \Doctrine\DBAL\Connection */
protected $internalConnection;
+ /** @var LoggerInterface */
+ protected $logger;
+
protected function setUp(): void {
parent::setUp();
$this->connection = \OC::$server->getDatabaseConnection();
$this->internalConnection = \OC::$server->get(\OC\DB\Connection::class);
+ $this->logger = $this->createMock(LoggerInterface::class);
$queryBuilder = $this->createMock(IQueryBuilder::class);
- $this->expressionBuilder = new ExpressionBuilder($this->connection, $queryBuilder);
+ $this->expressionBuilder = new ExpressionBuilder($this->connection, $queryBuilder, $this->logger);
$this->doctrineExpressionBuilder = new DoctrineExpressionBuilder($this->internalConnection);
}