Code Duplication    Length = 12-12 lines in 4 locations

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

@@ 325-336 (lines=12) @@
322
        $this->assertEquals($entity, $persister->loadById(['id' => 1], $entity));
323
    }
324
325
    public function testInvokeLoadOneToOneEntity()
326
    {
327
        $persister = $this->createPersisterDefault();
328
        $entity    = new Country("Foo");
329
330
        $this->entityPersister->expects($this->once())
331
            ->method('loadOneToOneEntity')
332
            ->with($this->equalTo([]), $this->equalTo('foo'), $this->equalTo(['id' => 11]))
333
            ->will($this->returnValue($entity));
334
335
        $this->assertEquals($entity, $persister->loadOneToOneEntity([], 'foo', ['id' => 11]));
336
    }
337
338
    public function testInvokeRefresh()
339
    {
@@ 338-349 (lines=12) @@
335
        $this->assertEquals($entity, $persister->loadOneToOneEntity([], 'foo', ['id' => 11]));
336
    }
337
338
    public function testInvokeRefresh()
339
    {
340
        $persister = $this->createPersisterDefault();
341
        $entity    = new Country("Foo");
342
343
        $this->entityPersister->expects($this->once())
344
            ->method('refresh')
345
            ->with($this->equalTo(['id' => 1]), $this->equalTo($entity), $this->equalTo(0))
346
            ->will($this->returnValue($entity));
347
348
        $this->assertNull($persister->refresh(['id' => 1], $entity), 0);
349
    }
350
351
    public function testInvokeLoadCriteria()
352
    {
@@ 373-384 (lines=12) @@
370
        $this->assertEquals([$entity], $persister->loadCriteria($criteria));
371
    }
372
373
    public function testInvokeGetManyToManyCollection()
374
    {
375
        $persister = $this->createPersisterDefault();
376
        $entity    = new Country("Foo");
377
378
        $this->entityPersister->expects($this->once())
379
            ->method('getManyToManyCollection')
380
            ->with($this->equalTo([]), $this->equalTo('Foo'), $this->equalTo(1), $this->equalTo(2))
381
            ->will($this->returnValue([$entity]));
382
383
        $this->assertEquals([$entity], $persister->getManyToManyCollection([], 'Foo', 1 ,2));
384
    }
385
386
    public function testInvokeGetOneToManyCollection()
387
    {
@@ 386-397 (lines=12) @@
383
        $this->assertEquals([$entity], $persister->getManyToManyCollection([], 'Foo', 1 ,2));
384
    }
385
386
    public function testInvokeGetOneToManyCollection()
387
    {
388
        $persister = $this->createPersisterDefault();
389
        $entity    = new Country("Foo");
390
391
        $this->entityPersister->expects($this->once())
392
            ->method('getOneToManyCollection')
393
            ->with($this->equalTo([]), $this->equalTo('Foo'), $this->equalTo(1), $this->equalTo(2))
394
            ->will($this->returnValue([$entity]));
395
396
        $this->assertEquals([$entity], $persister->getOneToManyCollection([], 'Foo', 1 ,2));
397
    }
398
399
    public function testInvokeLoadManyToManyCollection()
400
    {