Code Duplication    Length = 10-10 lines in 2 locations

tests/Doctrine/Tests/ORM/Functional/EntityRepositoryTest.php 2 locations

@@ 448-457 (lines=10) @@
445
    /**
446
     * @group DDC-817
447
     */
448
    public function testFindByAssociationKey()
449
    {
450
        list($userId, $addressId) = $this->loadAssociatedFixture();
451
        $repos = $this->_em->getRepository(CmsAddress::class);
452
        $addresses = $repos->findBy(['user' => $userId]);
453
454
        $this->assertContainsOnly(CmsAddress::class, $addresses);
455
        $this->assertEquals(1, count($addresses));
456
        $this->assertEquals($addressId, $addresses[0]->id);
457
    }
458
459
    /**
460
     * @group DDC-817
@@ 462-471 (lines=10) @@
459
    /**
460
     * @group DDC-817
461
     */
462
    public function testFindAssociationByMagicCall()
463
    {
464
        list($userId, $addressId) = $this->loadAssociatedFixture();
465
        $repos = $this->_em->getRepository(CmsAddress::class);
466
        $addresses = $repos->findByUser($userId);
467
468
        $this->assertContainsOnly(CmsAddress::class, $addresses);
469
        $this->assertEquals(1, count($addresses));
470
        $this->assertEquals($addressId, $addresses[0]->id);
471
    }
472
473
    /**
474
     * @group DDC-817