Code Duplication    Length = 6-6 lines in 2 locations

eZ/Publish/Core/Repository/Tests/Service/Integration/UserBase.php 2 locations

@@ 687-692 (lines=6) @@
684
        }
685
686
        $hasAddedLocation = false;
687
        foreach ($userLocations as $location) {
688
            if ($location->parentLocationId == $userGroup->getVersionInfo()->getContentInfo()->mainLocationId) {
689
                $hasAddedLocation = true;
690
                break;
691
            }
692
        }
693
694
        if (!$hasAddedLocation) {
695
            self::fail('Failed assigning user to user group');
@@ 746-751 (lines=6) @@
743
744
        if (is_array($userLocations) && !empty($userLocations)) {
745
            $hasRemovedLocation = false;
746
            foreach ($userLocations as $location) {
747
                if ($location->parentLocationId == $userGroup->getVersionInfo()->getContentInfo()->mainLocationId) {
748
                    $hasRemovedLocation = true;
749
                    break;
750
                }
751
            }
752
753
            if ($hasRemovedLocation) {
754
                self::fail('Failed removing a user from user group');