Code Duplication    Length = 13-14 lines in 2 locations

Tests/Transformer/ModelToElasticaAutoTransformerTest.php 2 locations

@@ 442-454 (lines=13) @@
439
        $this->assertEquals("parent", $document->getParent());
440
    }
441
442
    public function testNestedTransformHandlesSingleObjects()
443
    {
444
        $transformer = $this->getTransformer();
445
        $document    = $transformer->transform(new POPO(), array(
446
            'upper' => array(
447
                'type' => 'nested',
448
                'properties' => array('name' => '~')
449
            )
450
        ));
451
452
        $data = $document->getData();
453
        $this->assertEquals('a random name', $data['upper']['name']);
454
    }
455
456
    public function testNestedTransformReturnsAnEmptyArrayForNullValues()
457
    {
@@ 456-469 (lines=14) @@
453
        $this->assertEquals('a random name', $data['upper']['name']);
454
    }
455
456
    public function testNestedTransformReturnsAnEmptyArrayForNullValues()
457
    {
458
        $transformer = $this->getTransformer();
459
        $document    = $transformer->transform(new POPO(), array(
460
            'nullValue' => array(
461
                'type' => 'nested',
462
                'properties' => array()
463
            )
464
        ));
465
466
        $data = $document->getData();
467
        $this->assertInternalType('array', $data['nullValue']);
468
        $this->assertEmpty($data['nullValue']);
469
    }
470
471
    public function testUnmappedFieldValuesAreNormalisedToStrings()
472
    {