@@ 520-528 (lines=9) @@ | ||
517 | self::assertEquals(['romanb'], $params); |
|
518 | } |
|
519 | ||
520 | public function testIsNullCriteria() |
|
521 | { |
|
522 | $this->loadFixture(); |
|
523 | ||
524 | $repos = $this->em->getRepository(CmsUser::class); |
|
525 | ||
526 | $users = $repos->findBy(['status' => null]); |
|
527 | self::assertEquals(1, count($users)); |
|
528 | } |
|
529 | ||
530 | /** |
|
531 | * @group DDC-1094 |
|
@@ 723-731 (lines=9) @@ | ||
720 | /** |
|
721 | * @group DDC-1637 |
|
722 | */ |
|
723 | public function testMatchingEmptyCriteria() |
|
724 | { |
|
725 | $this->loadFixture(); |
|
726 | ||
727 | $repository = $this->em->getRepository(CmsUser::class); |
|
728 | $users = $repository->matching(new Criteria()); |
|
729 | ||
730 | self::assertEquals(4, count($users)); |
|
731 | } |
|
732 | ||
733 | /** |
|
734 | * @group DDC-1637 |
|
@@ 751-761 (lines=11) @@ | ||
748 | /** |
|
749 | * @group DDC-1637 |
|
750 | */ |
|
751 | public function testMatchingCriteriaNeqComparison() |
|
752 | { |
|
753 | $this->loadFixture(); |
|
754 | ||
755 | $repository = $this->em->getRepository(CmsUser::class); |
|
756 | $users = $repository->matching(new Criteria( |
|
757 | Criteria::expr()->neq('username', 'beberlei') |
|
758 | )); |
|
759 | ||
760 | self::assertEquals(3, count($users)); |
|
761 | } |
|
762 | ||
763 | /** |
|
764 | * @group DDC-1637 |