Code Duplication    Length = 11-11 lines in 2 locations

tests/Doctrine/Tests/ORM/Query/QueryTest.php 2 locations

@@ 324-334 (lines=11) @@
321
    /**
322
     * @group #6699
323
     */
324
    public function testSetParameterWithNameZeroIsNotOverridden() : void
325
    {
326
        $query = $this->_em->createQuery('select u from ' . CmsUser::class . ' u where u.id != ?0 and u.username = :name');
327
328
        $query->setParameter(0, 0);
329
        $query->setParameter('name', 'Doctrine');
330
331
        $this->assertSame(2, $query->getParameters()->count());
332
        $this->assertSame(0, $query->getParameter('0')->getValue());
333
        $this->assertSame('Doctrine', $query->getParameter('name')->getValue());
334
    }
335
336
    /**
337
     * @group #6699
@@ 339-349 (lines=11) @@
336
    /**
337
     * @group #6699
338
     */
339
    public function testSetParameterWithNameZeroDoesNotOverrideAnotherParameter() : void
340
    {
341
        $query = $this->_em->createQuery('select u from ' . CmsUser::class . ' u where u.id != ?0 and u.username = :name');
342
343
        $query->setParameter('name', 'Doctrine');
344
        $query->setParameter(0, 0);
345
346
        $this->assertSame(2, $query->getParameters()->count());
347
        $this->assertSame(0, $query->getParameter(0)->getValue());
348
        $this->assertSame('Doctrine', $query->getParameter('name')->getValue());
349
    }
350
351
    /**
352
     * @group #6699