Code Duplication    Length = 15-15 lines in 2 locations

Tests/Functional/SerializerTest.php 1 location

@@ 19-33 (lines=15) @@
16
 */
17
class SerializerTest extends WebTestCase
18
{
19
    public function testMappingIteratorToArrayField()
20
    {
21
        $client = $this->createClient(array('test_case' => 'Serializer'));
22
        $persister = $client->getContainer()->get('fos_elastica.object_persister.index.type');
23
24
        $object = new TypeObj();
25
        $object->id = 1;
26
        $object->coll = new \ArrayIterator(array('foo', 'bar'));
27
        $persister->insertOne($object);
28
29
        $object->coll = new \ArrayIterator(array('foo', 'bar', 'bazz'));
30
        $object->coll->offsetUnset(1);
31
32
        $persister->replaceOne($object);
33
    }
34
35
    public function testUnmappedType()
36
    {

Tests/Functional/MappingToElasticaTest.php 1 location

@@ 82-96 (lines=15) @@
79
        $this->assertNotEmpty($mapping, 'Mapping was populated');
80
    }
81
82
    public function testMappingIteratorToArrayField()
83
    {
84
        $client = $this->createClient(array('test_case' => 'ORM'));
85
        $persister = $client->getContainer()->get('fos_elastica.object_persister.index.type');
86
87
        $object = new TypeObj();
88
        $object->id = 1;
89
        $object->coll = new \ArrayIterator(array('foo', 'bar'));
90
        $persister->insertOne($object);
91
92
        $object->coll = new \ArrayIterator(array('foo', 'bar', 'bazz'));
93
        $object->coll->offsetUnset(1);
94
95
        $persister->replaceOne($object);
96
    }
97
98
    /**
99
     * @param Client $client