Code Duplication    Length = 15-15 lines in 2 locations

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

@@ 915-929 (lines=15) @@
912
        self::assertEquals(2, count($users));
913
    }
914
915
    public function testMatchingCriteriaStartsWithComparison()
916
    {
917
        $this->loadFixture();
918
919
        $repository = $this->em->getRepository(CmsUser::class);
920
921
        $users = $repository->matching(new Criteria(Criteria::expr()->startsWith('name', 'Foo')));
922
        self::assertCount(0, $users);
923
924
        $users = $repository->matching(new Criteria(Criteria::expr()->startsWith('name', 'R')));
925
        self::assertCount(1, $users);
926
927
        $users = $repository->matching(new Criteria(Criteria::expr()->startsWith('status', 'de')));
928
        self::assertCount(2, $users);
929
    }
930
931
    public function testMatchingCriteriaEndsWithComparison()
932
    {
@@ 931-945 (lines=15) @@
928
        self::assertCount(2, $users);
929
    }
930
931
    public function testMatchingCriteriaEndsWithComparison()
932
    {
933
        $this->loadFixture();
934
935
        $repository = $this->em->getRepository(CmsUser::class);
936
937
        $users = $repository->matching(new Criteria(Criteria::expr()->endsWith('name', 'foo')));
938
        self::assertCount(0, $users);
939
940
        $users = $repository->matching(new Criteria(Criteria::expr()->endsWith('name', 'oman')));
941
        self::assertCount(1, $users);
942
943
        $users = $repository->matching(new Criteria(Criteria::expr()->endsWith('status', 'ev')));
944
        self::assertCount(2, $users);
945
    }
946
947
    /**
948
     * @group DDC-2478