Code Duplication    Length = 9-11 lines in 5 locations

tests/Doctrine/Tests/ORM/Functional/EntityRepositoryTest.php 5 locations

@@ 686-694 (lines=9) @@
683
    /**
684
     * @group DDC-1637
685
     */
686
    public function testMatchingEmptyCriteria()
687
    {
688
        $this->loadFixture();
689
690
        $repository = $this->em->getRepository(CmsUser::class);
691
        $users = $repository->matching(new Criteria());
692
693
        self::assertCount(4, $users);
694
    }
695
696
    /**
697
     * @group DDC-1637
@@ 699-709 (lines=11) @@
696
    /**
697
     * @group DDC-1637
698
     */
699
    public function testMatchingCriteriaEqComparison()
700
    {
701
        $this->loadFixture();
702
703
        $repository = $this->em->getRepository(CmsUser::class);
704
        $users = $repository->matching(new Criteria(
705
            Criteria::expr()->eq('username', 'beberlei')
706
        ));
707
708
        self::assertCount(1, $users);
709
    }
710
711
    /**
712
     * @group DDC-1637
@@ 714-724 (lines=11) @@
711
    /**
712
     * @group DDC-1637
713
     */
714
    public function testMatchingCriteriaNeqComparison()
715
    {
716
        $this->loadFixture();
717
718
        $repository = $this->em->getRepository(CmsUser::class);
719
        $users = $repository->matching(new Criteria(
720
            Criteria::expr()->neq('username', 'beberlei')
721
        ));
722
723
        self::assertCount(3, $users);
724
    }
725
726
    /**
727
     * @group DDC-1637
@@ 789-799 (lines=11) @@
786
    /**
787
     * @group DDC-1637
788
     */
789
    public function testMatchingCriteriaGtComparison()
790
    {
791
        $firstUserId = $this->loadFixture();
792
793
        $repository = $this->em->getRepository(CmsUser::class);
794
        $users = $repository->matching(new Criteria(
795
            Criteria::expr()->gt('id', $firstUserId)
796
        ));
797
798
        self::assertCount(3, $users);
799
    }
800
801
    /**
802
     * @group DDC-1637
@@ 804-814 (lines=11) @@
801
    /**
802
     * @group DDC-1637
803
     */
804
    public function testMatchingCriteriaGteComparison()
805
    {
806
        $firstUserId = $this->loadFixture();
807
808
        $repository = $this->em->getRepository(CmsUser::class);
809
        $users = $repository->matching(new Criteria(
810
            Criteria::expr()->gte('id', $firstUserId)
811
        ));
812
813
        self::assertCount(4, $users);
814
    }
815
816
    /**
817
     * @group DDC-2430