Code Duplication    Length = 15-15 lines in 2 locations

tests/Doctrine/Tests/ORM/Cache/Persister/Entity/AbstractEntityPersisterTest.php 2 locations

@@ 399-413 (lines=15) @@
396
        $this->assertEquals([$entity], $persister->getOneToManyCollection([], 'Foo', 1 ,2));
397
    }
398
399
    public function testInvokeLoadManyToManyCollection()
400
    {
401
        $mapping   = $this->em->getClassMetadata(Country::class);
402
        $assoc     = ['type' => 1];
403
        $coll      = new PersistentCollection($this->em, $mapping, new ArrayCollection());
404
        $persister = $this->createPersisterDefault();
405
        $entity    = new Country("Foo");
406
407
        $this->entityPersister->expects($this->once())
408
            ->method('loadManyToManyCollection')
409
            ->with($this->equalTo($assoc), $this->equalTo('Foo'), $coll)
410
            ->will($this->returnValue([$entity]));
411
412
        $this->assertEquals([$entity], $persister->loadManyToManyCollection($assoc, 'Foo', $coll));
413
    }
414
415
    public function testInvokeLoadOneToManyCollection()
416
    {
@@ 415-429 (lines=15) @@
412
        $this->assertEquals([$entity], $persister->loadManyToManyCollection($assoc, 'Foo', $coll));
413
    }
414
415
    public function testInvokeLoadOneToManyCollection()
416
    {
417
        $mapping   = $this->em->getClassMetadata(Country::class);
418
        $assoc     = ['type' => 1];
419
        $coll      = new PersistentCollection($this->em, $mapping, new ArrayCollection());
420
        $persister = $this->createPersisterDefault();
421
        $entity    = new Country("Foo");
422
423
        $this->entityPersister->expects($this->once())
424
            ->method('loadOneToManyCollection')
425
            ->with($this->equalTo($assoc), $this->equalTo('Foo'), $coll)
426
            ->will($this->returnValue([$entity]));
427
428
        $this->assertEquals([$entity], $persister->loadOneToManyCollection($assoc, 'Foo', $coll));
429
    }
430
431
    public function testInvokeLock()
432
    {