@@ 1015-1024 (lines=10) @@ | ||
1012 | /** |
|
1013 | * @group DDC-1211 |
|
1014 | */ |
|
1015 | public function testEmptyStringLiteral() |
|
1016 | { |
|
1017 | $expr = $this->_em->getExpressionBuilder(); |
|
1018 | $qb = $this->_em->createQueryBuilder() |
|
1019 | ->select('u') |
|
1020 | ->from(CmsUser::class, 'u') |
|
1021 | ->where($expr->eq('u.username', $expr->literal(""))); |
|
1022 | ||
1023 | $this->assertEquals("SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.username = ''", $qb->getDQL()); |
|
1024 | } |
|
1025 | ||
1026 | /** |
|
1027 | * @group DDC-1211 |
|
@@ 1029-1038 (lines=10) @@ | ||
1026 | /** |
|
1027 | * @group DDC-1211 |
|
1028 | */ |
|
1029 | public function testEmptyNumericLiteral() |
|
1030 | { |
|
1031 | $expr = $this->_em->getExpressionBuilder(); |
|
1032 | $qb = $this->_em->createQueryBuilder() |
|
1033 | ->select('u') |
|
1034 | ->from(CmsUser::class, 'u') |
|
1035 | ->where($expr->eq('u.username', $expr->literal(0))); |
|
1036 | ||
1037 | $this->assertEquals('SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.username = 0', $qb->getDQL()); |
|
1038 | } |
|
1039 | ||
1040 | /** |
|
1041 | * @group DDC-1227 |