Code Duplication    Length = 12-13 lines in 2 locations

Tests/Units/ODM/MongoDB/Query/SpecificationVisitorTests.php 2 locations

@@ 82-94 (lines=13) @@
79
    /**
80
     * Test visitOr.
81
     */
82
    public function testVisitOr()
83
    {
84
        $this->visitTest(
85
            Criteria::property('foo')->eq(10)->orX(Criteria::property('bar')->eq(20)),
86
            function () {
87
                $qb = $this->createQueryBuilder();
88
89
                return $qb
90
                    ->addOr($qb->expr()->field('foo')->equals(10))
91
                    ->addOr($qb->expr()->field('bar')->equals(20));
92
            }
93
        );
94
    }
95
96
    /**
97
     * Test visitOr.
@@ 280-291 (lines=12) @@
277
    /**
278
     * Test visitAll.
279
     */
280
    public function testVisitAll()
281
    {
282
        $this->visitTest(Criteria::property('foo')->all(Criteria::property('bar')->gt(10)), function () {
283
            $qb = $this->createQueryBuilder();
284
285
            return $qb->field('foo')->all(
286
                $qb->expr()->elemMatch(
287
                    $qb->expr()->field('bar')->gt(10)
288
                )->getQuery()
289
            );
290
        });
291
    }
292
293
    /**
294
     * Test visitAtLeast.