‪TYPO3CMS  9.5
ExpressionBuilderTest.php
Go to the documentation of this file.
1 <?php
2 declare(strict_types = 1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
18 use Doctrine\DBAL\Platforms\AbstractPlatform;
19 use Prophecy\Argument;
20 use Prophecy\Prophecy\ObjectProphecy;
25 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
26 
30 class ‪ExpressionBuilderTest extends UnitTestCase
31 {
35  protected ‪$connectionProphet;
36 
40  protected ‪$subject;
41 
45  protected ‪$testTable = 'testTable';
46 
50  protected function ‪setUp()
51  {
52  parent::setUp();
53 
55  $this->connectionProphet = $this->prophesize(Connection::class);
56  $this->connectionProphet->quoteIdentifier(Argument::cetera())->willReturnArgument(0);
57 
58  $this->subject = new ‪ExpressionBuilder($this->connectionProphet->reveal());
59  }
60 
64  public function ‪andXReturnType()
65  {
66  $result = $this->subject->andX('"uid" = 1', '"pid" = 0');
67 
68  $this->assertInstanceOf(CompositeExpression::class, $result);
69  $this->assertSame(CompositeExpression::TYPE_AND, $result->getType());
70  }
71 
75  public function ‪orXReturnType()
76  {
77  $result = $this->subject->orX('"uid" = 1', '"uid" = 7');
78 
79  $this->assertInstanceOf(CompositeExpression::class, $result);
80  $this->assertSame(CompositeExpression::TYPE_OR, $result->getType());
81  }
82 
86  public function ‪eqQuotesIdentifier()
87  {
88  $result = $this->subject->eq('aField', 1);
89 
90  $this->connectionProphet->quoteIdentifier('aField')->shouldHaveBeenCalled();
91  $this->assertSame('aField = 1', $result);
92  }
93 
97  public function ‪neqQuotesIdentifier()
98  {
99  $result = $this->subject->neq('aField', 1);
100 
101  $this->connectionProphet->quoteIdentifier('aField')->shouldHaveBeenCalled();
102  $this->assertSame('aField <> 1', $result);
103  }
104 
108  public function ‪ltQuotesIdentifier()
109  {
110  $result = $this->subject->lt('aField', 1);
111 
112  $this->connectionProphet->quoteIdentifier('aField')->shouldHaveBeenCalled();
113  $this->assertSame('aField < 1', $result);
114  }
115 
119  public function ‪lteQuotesIdentifier()
120  {
121  $result = $this->subject->lte('aField', 1);
122 
123  $this->connectionProphet->quoteIdentifier('aField')->shouldHaveBeenCalled();
124  $this->assertSame('aField <= 1', $result);
125  }
126 
130  public function ‪gtQuotesIdentifier()
131  {
132  $result = $this->subject->gt('aField', 1);
133 
134  $this->connectionProphet->quoteIdentifier('aField')->shouldHaveBeenCalled();
135  $this->assertSame('aField > 1', $result);
136  }
137 
141  public function ‪gteQuotesIdentifier()
142  {
143  $result = $this->subject->gte('aField', 1);
144 
145  $this->connectionProphet->quoteIdentifier('aField')->shouldHaveBeenCalled();
146  $this->assertSame('aField >= 1', $result);
147  }
148 
152  public function ‪isNullQuotesIdentifier()
153  {
154  $result = $this->subject->isNull('aField');
155 
156  $this->connectionProphet->quoteIdentifier('aField')->shouldHaveBeenCalled();
157  $this->assertSame('aField IS NULL', $result);
158  }
159 
163  public function ‪isNotNullQuotesIdentifier()
164  {
165  $result = $this->subject->isNotNull('aField');
166 
167  $this->connectionProphet->quoteIdentifier('aField')->shouldHaveBeenCalled();
168  $this->assertSame('aField IS NOT NULL', $result);
169  }
170 
174  public function ‪likeQuotesIdentifier()
175  {
176  $result = $this->subject->like('aField', "'aValue%'");
177 
178  $this->connectionProphet->quoteIdentifier('aField')->shouldHaveBeenCalled();
179  $this->assertSame("aField LIKE 'aValue%'", $result);
180  }
181 
185  public function ‪notLikeQuotesIdentifier()
186  {
187  $result = $this->subject->notLike('aField', "'aValue%'");
188 
189  $this->connectionProphet->quoteIdentifier('aField')->shouldHaveBeenCalled();
190  $this->assertSame("aField NOT LIKE 'aValue%'", $result);
191  }
192 
196  public function ‪inWithStringQuotesIdentifier()
197  {
198  $result = $this->subject->in('aField', '1,2,3');
199 
200  $this->connectionProphet->quoteIdentifier('aField')->shouldHaveBeenCalled();
201  $this->assertSame('aField IN (1,2,3)', $result);
202  }
203 
207  public function ‪inWithArrayQuotesIdentifier()
208  {
209  $result = $this->subject->in('aField', [1, 2, 3]);
210 
211  $this->connectionProphet->quoteIdentifier('aField')->shouldHaveBeenCalled();
212  $this->assertSame('aField IN (1, 2, 3)', $result);
213  }
214 
218  public function ‪notInWithStringQuotesIdentifier()
219  {
220  $result = $this->subject->notIn('aField', '1,2,3');
221 
222  $this->connectionProphet->quoteIdentifier('aField')->shouldHaveBeenCalled();
223  $this->assertSame('aField NOT IN (1,2,3)', $result);
224  }
225 
229  public function ‪notInWithArrayQuotesIdentifier()
230  {
231  $result = $this->subject->notIn('aField', [1, 2, 3]);
232 
233  $this->connectionProphet->quoteIdentifier('aField')->shouldHaveBeenCalled();
234  $this->assertSame('aField NOT IN (1, 2, 3)', $result);
235  }
236 
240  public function ‪inSetThrowsExceptionWithEmptyValue()
241  {
242  $this->expectException(\InvalidArgumentException::class);
243  $this->expectExceptionCode(1459696089);
244  $this->subject->inSet('aField', '');
245  }
246 
251  {
252  $this->expectException(\InvalidArgumentException::class);
253  $this->expectExceptionCode(1459696090);
254  $this->subject->inSet('aField', 'an,Invalid,Value');
255  }
256 
260  public function ‪inSetForMySQL()
261  {
262  $databasePlatform = $this->prophesize(MockPlatform::class);
263  $databasePlatform->getName()->willReturn('mysql');
264 
265  $this->connectionProphet->quoteIdentifier(Argument::cetera())->will(function (‪$args) {
266  return '`' . ‪$args[0] . '`';
267  });
268 
269  $this->connectionProphet->getDatabasePlatform()->willReturn($databasePlatform->reveal());
270 
271  $result = $this->subject->inSet('aField', "'1'");
272 
273  $this->assertSame('FIND_IN_SET(\'1\', `aField`)', $result);
274  }
275 
279  public function ‪inSetForPostgreSQL()
280  {
281  $databasePlatform = $this->prophesize(MockPlatform::class);
282  $databasePlatform->getName()->willReturn('postgresql');
283  $databasePlatform->getStringLiteralQuoteCharacter()->willReturn('"');
284 
285  $this->connectionProphet->quote(',', Argument::cetera())->shouldBeCalled()->willReturn("','");
286  $this->connectionProphet->quote("'1'", null)->shouldBeCalled()->willReturn("'1'");
287  $this->connectionProphet->quoteIdentifier(Argument::cetera())->will(function (‪$args) {
288  return '"' . ‪$args[0] . '"';
289  });
290 
291  $this->connectionProphet->getDatabasePlatform()->willReturn($databasePlatform->reveal());
292 
293  $result = $this->subject->inSet('aField', "'1'");
294 
295  $this->assertSame('\'1\' = ANY(string_to_array("aField"::text, \',\'))', $result);
296  }
297 
301  public function ‪inSetForPostgreSQLWithColumn()
302  {
303  $databasePlatform = $this->prophesize(MockPlatform::class);
304  $databasePlatform->getName()->willReturn('postgresql');
305 
306  $this->connectionProphet->quote(',', Argument::cetera())->shouldBeCalled()->willReturn("','");
307  $this->connectionProphet->quoteIdentifier(Argument::cetera())->will(function (‪$args) {
308  return '"' . ‪$args[0] . '"';
309  });
310 
311  $this->connectionProphet->getDatabasePlatform()->willReturn($databasePlatform->reveal());
312 
313  $result = $this->subject->inSet('aField', '"testtable"."uid"', true);
314 
315  $this->assertSame('"testtable"."uid"::text = ANY(string_to_array("aField"::text, \',\'))', $result);
316  }
317 
321  public function ‪inSetForSQLite()
322  {
323  $databasePlatform = $this->prophesize(MockPlatform::class);
324  $databasePlatform->getName()->willReturn('sqlite');
325  $databasePlatform->getStringLiteralQuoteCharacter()->willReturn("'");
326 
327  $this->connectionProphet->quote(',', Argument::cetera())->shouldBeCalled()->willReturn("','");
328  $this->connectionProphet->quote(',1,', Argument::cetera())->shouldBeCalled()->willReturn("'%,1,%'");
329  $this->connectionProphet->quoteIdentifier(Argument::cetera())->will(function (‪$args) {
330  return '"' . ‪$args[0] . '"';
331  });
332 
333  $this->connectionProphet->getDatabasePlatform()->willReturn($databasePlatform->reveal());
334 
335  $result = $this->subject->inSet('aField', "'1'");
336 
337  $this->assertSame('instr(\',\'||"aField"||\',\', \'%,1,%\')', $result);
338  }
339 
344  {
345  $databasePlatform = $this->prophesize(MockPlatform::class);
346  $databasePlatform->getName()->willReturn('sqlite');
347  $databasePlatform->getStringLiteralQuoteCharacter()->willReturn("'");
348 
349  $this->connectionProphet->quote(',', Argument::cetera())->shouldBeCalled()->willReturn("','");
350  $this->connectionProphet->quote(',\'Some\'Value,', Argument::cetera())->shouldBeCalled()
351  ->willReturn("',''Some''Value,'");
352  $this->connectionProphet->quoteIdentifier(Argument::cetera())->will(function (‪$args) {
353  return '"' . ‪$args[0] . '"';
354  });
355 
356  $this->connectionProphet->getDatabasePlatform()->willReturn($databasePlatform->reveal());
357 
358  $result = $this->subject->inSet('aField', "'''Some''Value'");
359 
360  $this->assertSame('instr(\',\'||"aField"||\',\', \',\'\'Some\'\'Value,\')', $result);
361  }
362 
367  {
368  $databasePlatform = $this->prophesize(MockPlatform::class);
369  $databasePlatform->getName()->willReturn('sqlite');
370  $databasePlatform->getStringLiteralQuoteCharacter()->willReturn("'");
371 
372  $this->connectionProphet->getDatabasePlatform()->willReturn($databasePlatform->reveal());
373 
374  $this->expectException('InvalidArgumentException');
375  $this->expectExceptionCode(1476029421);
376 
377  $this->subject->inSet('aField', '?');
378  }
379 
384  {
385  $databasePlatform = $this->prophesize(MockPlatform::class);
386  $databasePlatform->getName()->willReturn('sqlite');
387  $databasePlatform->getStringLiteralQuoteCharacter()->willReturn("'");
388 
389  $this->connectionProphet->getDatabasePlatform()->willReturn($databasePlatform->reveal());
390 
391  $this->expectException('InvalidArgumentException');
392  $this->expectExceptionCode(1476029421);
393 
394  $this->subject->inSet('aField', ':dcValue1');
395  }
396 
400  public function ‪inSetForMssql()
401  {
402  $databasePlatform = $this->prophesize(MockPlatform::class);
403  $databasePlatform->getName()->willReturn('mssql');
404  $databasePlatform->getStringLiteralQuoteCharacter()->willReturn('\'');
405 
406  $this->connectionProphet->quote('1', null)->shouldBeCalled()->willReturn("'1'");
407  $this->connectionProphet->quote('1,%', null)->shouldBeCalled()->willReturn("'1,%'");
408  $this->connectionProphet->quote('%,1', null)->shouldBeCalled()->willReturn("'%,1'");
409  $this->connectionProphet->quote('%,1,%', null)->shouldBeCalled()->willReturn("'%,1,%'");
410  $this->connectionProphet->quoteIdentifier(Argument::cetera())->will(function (‪$args) {
411  return '[' . ‪$args[0] . ']';
412  });
413 
414  $this->connectionProphet->getDatabasePlatform()->willReturn($databasePlatform->reveal());
415 
416  $result = $this->subject->inSet('aField', "'1'");
417 
418  $this->assertSame("([aField] = '1') OR ([aField] LIKE '1,%') OR ([aField] LIKE '%,1') OR ([aField] LIKE '%,1,%')", $result);
419  }
420 
424  public function ‪defaultBitwiseAnd()
425  {
426  $databasePlatform = $this->prophesize(MockPlatform::class);
427 
428  $this->connectionProphet->quoteIdentifier(Argument::cetera())->will(function (‪$args) {
429  return '"' . ‪$args[0] . '"';
430  });
431 
432  $this->connectionProphet->getDatabasePlatform()->willReturn($databasePlatform->reveal());
433 
434  $this->assertSame('"aField" & 1', $this->subject->bitAnd('aField', 1));
435  }
436 
440  public function ‪bitwiseAndForOracle()
441  {
442  $databasePlatform = $this->prophesize(MockPlatform::class);
443  $databasePlatform->getName()->willReturn('pdo_oracle');
444 
445  $this->connectionProphet->quoteIdentifier(Argument::cetera())->will(function (‪$args) {
446  return '"' . ‪$args[0] . '"';
447  });
448 
449  $this->connectionProphet->getDatabasePlatform()->willReturn($databasePlatform->reveal());
450 
451  $this->assertSame('BITAND("aField", 1)', $this->subject->bitAnd('aField', 1));
452  }
453 
457  public function ‪maxQuotesIdentifier()
458  {
459  $this->connectionProphet->quoteIdentifier(Argument::cetera())->will(function (‪$args) {
460  $platform = new ‪MockPlatform();
461  return $platform->quoteIdentifier(‪$args[0]);
462  });
463 
464  $this->assertSame('MAX("tableName"."fieldName")', $this->subject->max('tableName.fieldName'));
465  $this->assertSame(
466  'MAX("tableName"."fieldName") AS "anAlias"',
467  $this->subject->max('tableName.fieldName', 'anAlias')
468  );
469  }
470 
474  public function ‪minQuotesIdentifier()
475  {
476  $this->connectionProphet->quoteIdentifier(Argument::cetera())->will(function (‪$args) {
477  $platform = new ‪MockPlatform();
478  return $platform->quoteIdentifier(‪$args[0]);
479  });
480 
481  $this->assertSame('MIN("tableName"."fieldName")', $this->subject->min('tableName.fieldName'));
482  $this->assertSame(
483  'MIN("tableName"."fieldName") AS "anAlias"',
484  $this->subject->min('tableName.fieldName', 'anAlias')
485  );
486  }
487 
491  public function ‪sumQuotesIdentifier()
492  {
493  $this->connectionProphet->quoteIdentifier(Argument::cetera())->will(function (‪$args) {
494  $platform = new ‪MockPlatform();
495  return $platform->quoteIdentifier(‪$args[0]);
496  });
497 
498  $this->assertSame('SUM("tableName"."fieldName")', $this->subject->sum('tableName.fieldName'));
499  $this->assertSame(
500  'SUM("tableName"."fieldName") AS "anAlias"',
501  $this->subject->sum('tableName.fieldName', 'anAlias')
502  );
503  }
504 
508  public function ‪avgQuotesIdentifier()
509  {
510  $this->connectionProphet->quoteIdentifier(Argument::cetera())->will(function (‪$args) {
511  $platform = new ‪MockPlatform();
512  return $platform->quoteIdentifier(‪$args[0]);
513  });
514 
515  $this->assertSame('AVG("tableName"."fieldName")', $this->subject->avg('tableName.fieldName'));
516  $this->assertSame(
517  'AVG("tableName"."fieldName") AS "anAlias"',
518  $this->subject->avg('tableName.fieldName', 'anAlias')
519  );
520  }
521 
525  public function ‪countQuotesIdentifier()
526  {
527  $this->connectionProphet->quoteIdentifier(Argument::cetera())->will(function (‪$args) {
528  $platform = new ‪MockPlatform();
529  return $platform->quoteIdentifier(‪$args[0]);
530  });
531 
532  $this->assertSame('COUNT("tableName"."fieldName")', $this->subject->count('tableName.fieldName'));
533  $this->assertSame(
534  'COUNT("tableName"."fieldName") AS "anAlias"',
535  $this->subject->count('tableName.fieldName', 'anAlias')
536  );
537  }
538 
542  public function ‪lengthQuotesIdentifier()
543  {
544  $this->connectionProphet->quoteIdentifier(Argument::cetera())->will(function (‪$args) {
545  $platform = new ‪MockPlatform();
546  return $platform->quoteIdentifier(‪$args[0]);
547  });
548 
549  $this->assertSame('LENGTH("tableName"."fieldName")', $this->subject->length('tableName.fieldName'));
550  $this->assertSame(
551  'LENGTH("tableName"."fieldName") AS "anAlias"',
552  $this->subject->length('tableName.fieldName', 'anAlias')
553  );
554  }
555 
560  {
561  $platform = new ‪MockPlatform();
562  $this->connectionProphet->getDatabasePlatform(Argument::cetera())
563  ->shouldBeCalled()
564  ->willReturn($platform);
565  $this->connectionProphet->quoteIdentifier(Argument::cetera())
566  ->shouldBeCalled()
567  ->will(
568  function (‪$args) use ($platform) {
569  return $platform->quoteIdentifier(‪$args[0]);
570  }
571  );
572 
573  $this->assertSame(
574  'TRIM("tableName"."fieldName")',
575  $this->subject->trim('tableName.fieldName')
576  );
577  }
578 
582  public function ‪trimQuotesIdentifierDataProvider()
583  {
584  return [
585  'trim leading character' => [
586  AbstractPlatform::TRIM_LEADING,
587  'x',
588  'TRIM(LEADING "x" FROM "tableName"."fieldName")'
589  ],
590  'trim trailing character' => [
591  AbstractPlatform::TRIM_TRAILING,
592  'x',
593  'TRIM(TRAILING "x" FROM "tableName"."fieldName")',
594  ],
595  'trim character' => [
596  AbstractPlatform::TRIM_BOTH,
597  'x',
598  'TRIM(BOTH "x" FROM "tableName"."fieldName")',
599  ],
600  'trim space' => [
601  AbstractPlatform::TRIM_BOTH,
602  ' ',
603  'TRIM(BOTH " " FROM "tableName"."fieldName")',
604  ]
605  ];
606  }
607 
616  public function ‪trimQuotesIdentifier(int $position, string $char, string $expected)
617  {
618  $platform = new ‪MockPlatform();
619  $this->connectionProphet->getDatabasePlatform(Argument::cetera())
620  ->shouldBeCalled()
621  ->willReturn($platform);
622  $this->connectionProphet->quoteIdentifier(Argument::cetera())
623  ->shouldBeCalled()
624  ->will(
625  function (‪$args) use ($platform) {
626  return $platform->quoteIdentifier(‪$args[0]);
627  }
628  );
629  $this->connectionProphet->quote(Argument::cetera())
630  ->shouldBeCalled()
631  ->will(
632  function (‪$args) {
633  return '"' . ‪$args[0] . '"';
634  }
635  );
636 
637  $this->assertSame(
638  $expected,
639  $this->subject->trim('tableName.fieldName', $position, $char)
640  );
641  }
642 
646  public function ‪literalQuotesValue()
647  {
648  $this->connectionProphet->quote('aField', 'Doctrine\DBAL\Types\StringType')
649  ->shouldBeCalled()
650  ->willReturn('"aField"');
651  $result = $this->subject->literal('aField', 'Doctrine\DBAL\Types\StringType');
652 
653  $this->assertSame('"aField"', $result);
654  }
655 }
‪TYPO3\CMS\Core\Tests\Unit\Database\Query\Expression\ExpressionBuilderTest\inSetForPostgreSQLWithColumn
‪inSetForPostgreSQLWithColumn()
Definition: ExpressionBuilderTest.php:298
‪TYPO3\CMS\Core\Tests\Unit\Database\Query\Expression\ExpressionBuilderTest\gtQuotesIdentifier
‪gtQuotesIdentifier()
Definition: ExpressionBuilderTest.php:127
‪TYPO3\CMS\Core\Tests\Unit\Database\Query\Expression\ExpressionBuilderTest\inSetForSQLiteThrowsExceptionOnPositionalPlaceholder
‪inSetForSQLiteThrowsExceptionOnPositionalPlaceholder()
Definition: ExpressionBuilderTest.php:363
‪TYPO3\CMS\Core\Tests\Unit\Database\Query\Expression\ExpressionBuilderTest\avgQuotesIdentifier
‪avgQuotesIdentifier()
Definition: ExpressionBuilderTest.php:505
‪TYPO3\CMS\Core\Database\Query\Expression\ExpressionBuilder
Definition: ExpressionBuilder.php:33
‪$args
‪$args
Definition: checkIntegrityCsvFixtures.php:230
‪TYPO3\CMS\Core\Tests\Unit\Database\Query\Expression\ExpressionBuilderTest\ltQuotesIdentifier
‪ltQuotesIdentifier()
Definition: ExpressionBuilderTest.php:105
‪TYPO3\CMS\Core\Tests\Unit\Database\Query\Expression\ExpressionBuilderTest\bitwiseAndForOracle
‪bitwiseAndForOracle()
Definition: ExpressionBuilderTest.php:437
‪TYPO3\CMS\Core\Tests\Unit\Database\Query\Expression\ExpressionBuilderTest\sumQuotesIdentifier
‪sumQuotesIdentifier()
Definition: ExpressionBuilderTest.php:488
‪TYPO3\CMS\Core\Tests\Unit\Database\Query\Expression\ExpressionBuilderTest\countQuotesIdentifier
‪countQuotesIdentifier()
Definition: ExpressionBuilderTest.php:522
‪TYPO3\CMS\Core\Tests\Unit\Database\Query\Expression\ExpressionBuilderTest\notInWithStringQuotesIdentifier
‪notInWithStringQuotesIdentifier()
Definition: ExpressionBuilderTest.php:215
‪TYPO3\CMS\Core\Tests\Unit\Database\Query\Expression\ExpressionBuilderTest\setUp
‪setUp()
Definition: ExpressionBuilderTest.php:47
‪TYPO3\CMS\Core\Tests\Unit\Database\Query\Expression\ExpressionBuilderTest\$connectionProphet
‪Connection $connectionProphet
Definition: ExpressionBuilderTest.php:34
‪TYPO3\CMS\Core\Tests\Unit\Database\Query\Expression\ExpressionBuilderTest\notLikeQuotesIdentifier
‪notLikeQuotesIdentifier()
Definition: ExpressionBuilderTest.php:182
‪TYPO3\CMS\Core\Tests\Unit\Database\Query\Expression\ExpressionBuilderTest\inWithArrayQuotesIdentifier
‪inWithArrayQuotesIdentifier()
Definition: ExpressionBuilderTest.php:204
‪TYPO3\CMS\Core\Tests\Unit\Database\Query\Expression\ExpressionBuilderTest\isNullQuotesIdentifier
‪isNullQuotesIdentifier()
Definition: ExpressionBuilderTest.php:149
‪TYPO3\CMS\Core\Tests\Unit\Database\Query\Expression\ExpressionBuilderTest\neqQuotesIdentifier
‪neqQuotesIdentifier()
Definition: ExpressionBuilderTest.php:94
‪TYPO3\CMS\Core\Tests\Unit\Database\Query\Expression\ExpressionBuilderTest
Definition: ExpressionBuilderTest.php:31
‪TYPO3\CMS\Core\Tests\Unit\Database\Query\Expression\ExpressionBuilderTest\andXReturnType
‪andXReturnType()
Definition: ExpressionBuilderTest.php:61
‪TYPO3\CMS\Core\Tests\Unit\Database\Query\Expression\ExpressionBuilderTest\$subject
‪ExpressionBuilder $subject
Definition: ExpressionBuilderTest.php:38
‪TYPO3\CMS\Core\Tests\Unit\Database\Query\Expression\ExpressionBuilderTest\minQuotesIdentifier
‪minQuotesIdentifier()
Definition: ExpressionBuilderTest.php:471
‪TYPO3\CMS\Core\Tests\Unit\Database\Query\Expression\ExpressionBuilderTest\isNotNullQuotesIdentifier
‪isNotNullQuotesIdentifier()
Definition: ExpressionBuilderTest.php:160
‪TYPO3\CMS\Core\Tests\Unit\Database\Query\Expression\ExpressionBuilderTest\trimQuotesIdentifierWithDefaultValues
‪trimQuotesIdentifierWithDefaultValues()
Definition: ExpressionBuilderTest.php:556
‪TYPO3\CMS\Core\Tests\Unit\Database\Query\Expression\ExpressionBuilderTest\$testTable
‪string $testTable
Definition: ExpressionBuilderTest.php:42
‪TYPO3\CMS\Core\Tests\Unit\Database\Query\Expression\ExpressionBuilderTest\inSetForMySQL
‪inSetForMySQL()
Definition: ExpressionBuilderTest.php:257
‪TYPO3\CMS\Core\Database\Query\Expression\CompositeExpression
Definition: CompositeExpression.php:23
‪TYPO3\CMS\Core\Tests\Unit\Database\Query\Expression\ExpressionBuilderTest\gteQuotesIdentifier
‪gteQuotesIdentifier()
Definition: ExpressionBuilderTest.php:138
‪TYPO3\CMS\Core\Tests\Unit\Database\Mocks\MockPlatform
Definition: MockPlatform.php:21
‪TYPO3\CMS\Core\Tests\Unit\Database\Query\Expression\ExpressionBuilderTest\inSetForSQLite
‪inSetForSQLite()
Definition: ExpressionBuilderTest.php:318
‪TYPO3\CMS\Core\Tests\Unit\Database\Query\Expression\ExpressionBuilderTest\inSetThrowsExceptionWithEmptyValue
‪inSetThrowsExceptionWithEmptyValue()
Definition: ExpressionBuilderTest.php:237
‪TYPO3\CMS\Core\Tests\Unit\Database\Query\Expression\ExpressionBuilderTest\inSetThrowsExceptionWithInvalidValue
‪inSetThrowsExceptionWithInvalidValue()
Definition: ExpressionBuilderTest.php:247
‪TYPO3\CMS\Core\Tests\Unit\Database\Query\Expression\ExpressionBuilderTest\eqQuotesIdentifier
‪eqQuotesIdentifier()
Definition: ExpressionBuilderTest.php:83
‪TYPO3\CMS\Core\Tests\Unit\Database\Query\Expression\ExpressionBuilderTest\inSetForSQLiteWithQuoteCharactersInValue
‪inSetForSQLiteWithQuoteCharactersInValue()
Definition: ExpressionBuilderTest.php:340
‪TYPO3\CMS\Core\Tests\Unit\Database\Query\Expression\ExpressionBuilderTest\likeQuotesIdentifier
‪likeQuotesIdentifier()
Definition: ExpressionBuilderTest.php:171
‪TYPO3\CMS\Core\Tests\Unit\Database\Query\Expression\ExpressionBuilderTest\lengthQuotesIdentifier
‪lengthQuotesIdentifier()
Definition: ExpressionBuilderTest.php:539
‪TYPO3\CMS\Core\Tests\Unit\Database\Query\Expression\ExpressionBuilderTest\lteQuotesIdentifier
‪lteQuotesIdentifier()
Definition: ExpressionBuilderTest.php:116
‪TYPO3\CMS\Core\Database\Connection
Definition: Connection.php:31
‪TYPO3\CMS\Core\Tests\Unit\Database\Query\Expression\ExpressionBuilderTest\notInWithArrayQuotesIdentifier
‪notInWithArrayQuotesIdentifier()
Definition: ExpressionBuilderTest.php:226
‪TYPO3\CMS\Core\Tests\Unit\Database\Query\Expression\ExpressionBuilderTest\trimQuotesIdentifier
‪trimQuotesIdentifier(int $position, string $char, string $expected)
Definition: ExpressionBuilderTest.php:613
‪TYPO3\CMS\Core\Tests\Unit\Database\Query\Expression\ExpressionBuilderTest\trimQuotesIdentifierDataProvider
‪array trimQuotesIdentifierDataProvider()
Definition: ExpressionBuilderTest.php:579
‪TYPO3\CMS\Core\Tests\Unit\Database\Query\Expression\ExpressionBuilderTest\maxQuotesIdentifier
‪maxQuotesIdentifier()
Definition: ExpressionBuilderTest.php:454
‪TYPO3\CMS\Core\Tests\Unit\Database\Query\Expression\ExpressionBuilderTest\inSetForMssql
‪inSetForMssql()
Definition: ExpressionBuilderTest.php:397
‪TYPO3\CMS\Core\Tests\Unit\Database\Query\Expression
Definition: ExpressionBuilderTest.php:3
‪TYPO3\CMS\Core\Tests\Unit\Database\Query\Expression\ExpressionBuilderTest\inSetForPostgreSQL
‪inSetForPostgreSQL()
Definition: ExpressionBuilderTest.php:276
‪TYPO3\CMS\Core\Tests\Unit\Database\Query\Expression\ExpressionBuilderTest\inSetForSQLiteThrowsExceptionOnNamedPlaceholder
‪inSetForSQLiteThrowsExceptionOnNamedPlaceholder()
Definition: ExpressionBuilderTest.php:380
‪TYPO3\CMS\Core\Tests\Unit\Database\Query\Expression\ExpressionBuilderTest\inWithStringQuotesIdentifier
‪inWithStringQuotesIdentifier()
Definition: ExpressionBuilderTest.php:193
‪TYPO3\CMS\Core\Tests\Unit\Database\Query\Expression\ExpressionBuilderTest\literalQuotesValue
‪literalQuotesValue()
Definition: ExpressionBuilderTest.php:643
‪TYPO3\CMS\Core\Tests\Unit\Database\Query\Expression\ExpressionBuilderTest\orXReturnType
‪orXReturnType()
Definition: ExpressionBuilderTest.php:72
‪TYPO3\CMS\Core\Tests\Unit\Database\Query\Expression\ExpressionBuilderTest\defaultBitwiseAnd
‪defaultBitwiseAnd()
Definition: ExpressionBuilderTest.php:421