Code Duplication    Length = 13-13 lines in 2 locations

src/Oro/Bundle/ApiBundle/Tests/Unit/Collection/CriteriaTest.php 2 locations

@@ 269-281 (lines=13) @@
266
        );
267
    }
268
269
    public function testAddInnerJoinAndThenLeftJoinForSameJoinStatement()
270
    {
271
        $this->criteria->addInnerJoin('products', '{root}.products');
272
        $this->criteria->addLeftJoin('products', '{root}.products');
273
274
        $expectedJoin = new Join(Join::INNER_JOIN, '{root}.products');
275
        $this->assertTrue($this->criteria->hasJoin('products'));
276
        $this->assertEquals($expectedJoin, $this->criteria->getJoin('products'));
277
        $this->assertEquals(['products' => $expectedJoin], $this->criteria->getJoins());
278
        $this->assertQuery(
279
            'SELECT e FROM Test:User e INNER JOIN e.products a1'
280
        );
281
    }
282
283
    public function testAddLeftJoinAndThenInnerJoinForSameJoinStatement()
284
    {
@@ 283-295 (lines=13) @@
280
        );
281
    }
282
283
    public function testAddLeftJoinAndThenInnerJoinForSameJoinStatement()
284
    {
285
        $this->criteria->addLeftJoin('products', '{root}.products');
286
        $this->criteria->addInnerJoin('products', '{root}.products');
287
288
        $expectedJoin = new Join(Join::INNER_JOIN, '{root}.products');
289
        $this->assertTrue($this->criteria->hasJoin('products'));
290
        $this->assertEquals($expectedJoin, $this->criteria->getJoin('products'));
291
        $this->assertEquals(['products' => $expectedJoin], $this->criteria->getJoins());
292
        $this->assertQuery(
293
            'SELECT e FROM Test:User e INNER JOIN e.products a1'
294
        );
295
    }
296
297
    public function testCompleteJoinsForOrderBy()
298
    {