@@ 285-294 (lines=10) @@ | ||
282 | $this->assertValidQueryBuilder($qb, 'SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE (((u.id = :uid OR u.id = :uid2) AND u.id = :uid3) OR u.name = :name1 OR u.name = :name2) AND u.name <> :noname'); |
|
283 | } |
|
284 | ||
285 | public function testAndWhereIn() |
|
286 | { |
|
287 | $qb = $this->_em->createQueryBuilder(); |
|
288 | $qb->select('u') |
|
289 | ->from(CmsUser::class, 'u') |
|
290 | ->where('u.id = :uid') |
|
291 | ->andWhere($qb->expr()->in('u.id', [1, 2, 3])); |
|
292 | ||
293 | $this->assertValidQueryBuilder($qb, 'SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.id = :uid AND u.id IN(1, 2, 3)'); |
|
294 | } |
|
295 | ||
296 | public function testOrWhereIn() |
|
297 | { |
|
@@ 296-305 (lines=10) @@ | ||
293 | $this->assertValidQueryBuilder($qb, 'SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.id = :uid AND u.id IN(1, 2, 3)'); |
|
294 | } |
|
295 | ||
296 | public function testOrWhereIn() |
|
297 | { |
|
298 | $qb = $this->_em->createQueryBuilder(); |
|
299 | $qb->select('u') |
|
300 | ->from(CmsUser::class, 'u') |
|
301 | ->where('u.id = :uid') |
|
302 | ->orWhere($qb->expr()->in('u.id', [1, 2, 3])); |
|
303 | ||
304 | $this->assertValidQueryBuilder($qb, 'SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.id = :uid OR u.id IN(1, 2, 3)'); |
|
305 | } |
|
306 | ||
307 | public function testAndWhereNotIn() |
|
308 | { |
|
@@ 307-316 (lines=10) @@ | ||
304 | $this->assertValidQueryBuilder($qb, 'SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.id = :uid OR u.id IN(1, 2, 3)'); |
|
305 | } |
|
306 | ||
307 | public function testAndWhereNotIn() |
|
308 | { |
|
309 | $qb = $this->_em->createQueryBuilder(); |
|
310 | $qb->select('u') |
|
311 | ->from(CmsUser::class, 'u') |
|
312 | ->where('u.id = :uid') |
|
313 | ->andWhere($qb->expr()->notIn('u.id', [1, 2, 3])); |
|
314 | ||
315 | $this->assertValidQueryBuilder($qb, 'SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.id = :uid AND u.id NOT IN(1, 2, 3)'); |
|
316 | } |
|
317 | ||
318 | public function testOrWhereNotIn() |
|
319 | { |
|
@@ 318-327 (lines=10) @@ | ||
315 | $this->assertValidQueryBuilder($qb, 'SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.id = :uid AND u.id NOT IN(1, 2, 3)'); |
|
316 | } |
|
317 | ||
318 | public function testOrWhereNotIn() |
|
319 | { |
|
320 | $qb = $this->_em->createQueryBuilder(); |
|
321 | $qb->select('u') |
|
322 | ->from(CmsUser::class, 'u') |
|
323 | ->where('u.id = :uid') |
|
324 | ->orWhere($qb->expr()->notIn('u.id', [1, 2, 3])); |
|
325 | ||
326 | $this->assertValidQueryBuilder($qb, 'SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.id = :uid OR u.id NOT IN(1, 2, 3)'); |
|
327 | } |
|
328 | ||
329 | public function testGroupBy() |
|
330 | { |