Code Duplication    Length = 13-13 lines in 2 locations

tests/Doctrine/Tests/ORM/QueryBuilderTest.php 2 locations

@@ 836-848 (lines=13) @@
833
        $this->assertEquals(0, count($qb->getDQLPart('orderBy')));
834
    }
835
836
    public function testResetDQLParts()
837
    {
838
        $qb = $this->_em->createQueryBuilder()
839
            ->select('u')
840
            ->from(CmsUser::class, 'u')
841
            ->where('u.username = ?1')->orderBy('u.username');
842
843
        $qb->resetDQLParts(['where', 'orderBy']);
844
845
        $this->assertEquals(1, count($qb->getDQLPart('select')));
846
        $this->assertNull($qb->getDQLPart('where'));
847
        $this->assertEquals(0, count($qb->getDQLPart('orderBy')));
848
    }
849
850
    public function testResetAllDQLParts()
851
    {
@@ 850-862 (lines=13) @@
847
        $this->assertEquals(0, count($qb->getDQLPart('orderBy')));
848
    }
849
850
    public function testResetAllDQLParts()
851
    {
852
        $qb = $this->_em->createQueryBuilder()
853
            ->select('u')
854
            ->from(CmsUser::class, 'u')
855
            ->where('u.username = ?1')->orderBy('u.username');
856
857
        $qb->resetDQLParts();
858
859
        $this->assertEquals(0, count($qb->getDQLPart('select')));
860
        $this->assertNull($qb->getDQLPart('where'));
861
        $this->assertEquals(0, count($qb->getDQLPart('orderBy')));
862
    }
863
864
    /**
865
     * @group DDC-867