Code Duplication    Length = 8-8 lines in 5 locations

tests/Doctrine/Tests/ORM/Functional/Ticket/DDC288Test.php 5 locations

@@ 41-48 (lines=8) @@
38
        $this->_em->clear();
39
    }
40
41
    public function testCollectionFilteringLteOperator()
42
    {
43
        $firstProduct = $this->_em->find(ECommerceProduct::class, $this->firstProduct->getId());
44
45
        $criteria = Criteria::create()->where(Criteria::expr()->lte('id', $this->secondCategory->getId()));
46
47
        $this->assertCount(2, $firstProduct->getCategories()->matching($criteria));
48
    }
49
50
    public function testCollectionFilteringLtOperator()
51
    {
@@ 50-57 (lines=8) @@
47
        $this->assertCount(2, $firstProduct->getCategories()->matching($criteria));
48
    }
49
50
    public function testCollectionFilteringLtOperator()
51
    {
52
        $firstProduct = $this->_em->find(ECommerceProduct::class, $this->firstProduct->getId());
53
54
        $criteria = Criteria::create()->where(Criteria::expr()->lt('id', $this->secondCategory->getId()));
55
56
        $this->assertCount(1, $firstProduct->getCategories()->matching($criteria));
57
    }
58
59
    public function testCollectionFilteringGteOperator()
60
    {
@@ 59-66 (lines=8) @@
56
        $this->assertCount(1, $firstProduct->getCategories()->matching($criteria));
57
    }
58
59
    public function testCollectionFilteringGteOperator()
60
    {
61
        $firstProduct = $this->_em->find(ECommerceProduct::class, $this->firstProduct->getId());
62
63
        $criteria = Criteria::create()->where(Criteria::expr()->gte('id', $this->firstCategory->getId()));
64
65
        $this->assertCount(2, $firstProduct->getCategories()->matching($criteria));
66
    }
67
68
    public function testCollectionFilteringGtOperator()
69
    {
@@ 68-75 (lines=8) @@
65
        $this->assertCount(2, $firstProduct->getCategories()->matching($criteria));
66
    }
67
68
    public function testCollectionFilteringGtOperator()
69
    {
70
        $firstProduct = $this->_em->find(ECommerceProduct::class, $this->firstProduct->getId());
71
72
        $criteria = Criteria::create()->where(Criteria::expr()->gt('id', $this->firstCategory->getId()));
73
74
        $this->assertCount(1, $firstProduct->getCategories()->matching($criteria));
75
    }
76
77
    public function testCollectionFilteringEqualsOperator()
78
    {
@@ 77-84 (lines=8) @@
74
        $this->assertCount(1, $firstProduct->getCategories()->matching($criteria));
75
    }
76
77
    public function testCollectionFilteringEqualsOperator()
78
    {
79
        $firstProduct = $this->_em->find(ECommerceProduct::class, $this->firstProduct->getId());
80
81
        $criteria = Criteria::create()->where(Criteria::expr()->eq('id', $this->firstCategory->getId()));
82
83
        $this->assertCount(1, $firstProduct->getCategories()->matching($criteria));
84
    }
85
}
86