Code Duplication    Length = 21-24 lines in 2 locations

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

@@ 1044-1064 (lines=21) @@
1041
    /**
1042
     * @group DDC-3056
1043
     */
1044
    public function testFindByNullValueInInCondition()
1045
    {
1046
        $user1 = new CmsUser();
1047
        $user2 = new CmsUser();
1048
1049
        $user1->username = 'ocramius';
1050
        $user1->name = 'Marco';
1051
        $user2->status = null;
1052
        $user2->username = 'deeky666';
1053
        $user2->name = 'Steve';
1054
        $user2->status = 'dbal maintainer';
1055
1056
        $this->em->persist($user1);
1057
        $this->em->persist($user2);
1058
        $this->em->flush();
1059
1060
        $users = $this->em->getRepository(CmsUser::class)->findBy(['status' => [null]]);
1061
1062
        self::assertCount(1, $users);
1063
        self::assertSame($user1, reset($users));
1064
    }
1065
1066
    /**
1067
     * @group DDC-3056
@@ 1069-1092 (lines=24) @@
1066
    /**
1067
     * @group DDC-3056
1068
     */
1069
    public function testFindByNullValueInMultipleInCriteriaValues()
1070
    {
1071
        $user1 = new CmsUser();
1072
        $user2 = new CmsUser();
1073
1074
        $user1->username = 'ocramius';
1075
        $user1->name = 'Marco';
1076
        $user2->status = null;
1077
        $user2->username = 'deeky666';
1078
        $user2->name = 'Steve';
1079
        $user2->status = 'dbal maintainer';
1080
1081
        $this->em->persist($user1);
1082
        $this->em->persist($user2);
1083
        $this->em->flush();
1084
1085
        $users = $this
1086
            ->em
1087
            ->getRepository(CmsUser::class)
1088
            ->findBy(['status' => ['foo', null]]);
1089
1090
        self::assertCount(1, $users);
1091
        self::assertSame($user1, reset($users));
1092
    }
1093
1094
    /**
1095
     * @group DDC-3056