Code Duplication    Length = 9-9 lines in 4 locations

Tests/Transformer/ModelToElasticaAutoTransformerTest.php 4 locations

@@ 402-410 (lines=9) @@
399
        );
400
    }
401
402
    public function testParentMapping()
403
    {
404
        $transformer = $this->getTransformer();
405
        $document    = $transformer->transform(new POPO(), array(
406
            '_parent' => array('type' => 'upper', 'property' => 'upper', 'identifier' => 'id'),
407
        ));
408
409
        $this->assertEquals('parent', $document->getParent());
410
    }
411
412
    public function testParentMappingWithCustomIdentifier()
413
    {
@@ 412-420 (lines=9) @@
409
        $this->assertEquals('parent', $document->getParent());
410
    }
411
412
    public function testParentMappingWithCustomIdentifier()
413
    {
414
        $transformer = $this->getTransformer();
415
        $document    = $transformer->transform(new POPO(), array(
416
            '_parent' => array('type' => 'upper', 'property' => 'upper', 'identifier' => 'name'),
417
        ));
418
419
        $this->assertEquals('a random name', $document->getParent());
420
    }
421
422
    public function testParentMappingWithNullProperty()
423
    {
@@ 422-430 (lines=9) @@
419
        $this->assertEquals('a random name', $document->getParent());
420
    }
421
422
    public function testParentMappingWithNullProperty()
423
    {
424
        $transformer = $this->getTransformer();
425
        $document    = $transformer->transform(new POPO(), array(
426
            '_parent' => array('type' => 'upper', 'property' => null, 'identifier' => 'id'),
427
        ));
428
429
        $this->assertEquals('parent', $document->getParent());
430
    }
431
432
    public function testParentMappingWithCustomProperty()
433
    {
@@ 432-440 (lines=9) @@
429
        $this->assertEquals('parent', $document->getParent());
430
    }
431
432
    public function testParentMappingWithCustomProperty()
433
    {
434
        $transformer = $this->getTransformer();
435
        $document    = $transformer->transform(new POPO(), array(
436
            '_parent' => array('type' => 'upper', 'property' => 'upperAlias', 'identifier' => 'id'),
437
        ));
438
439
        $this->assertEquals('parent', $document->getParent());
440
    }
441
442
    public function testThatMappedObjectsDontNeedAnIdentifierField()
443
    {