Code Duplication    Length = 19-20 lines in 2 locations

tests/EdmxTest.php 2 locations

@@ 141-160 (lines=20) @@
138
        $this->checkEdmxSerialiseDeserialiseRoundTrip($ds, $edmx, $msg);
139
    }
140
141
    public function testKnownGoodV3DocumentDeserialiseToOk()
142
    {
143
        $this->markTestSkipped('Skipped until service-document models get implemented');
144
        $ds = DIRECTORY_SEPARATOR;
145
        $msg = null;
146
147
        $docLocation = dirname(__DIR__) . $ds . "tests" . $ds . "exampleV3ServiceDocument.xml";
148
        $document = file_get_contents($docLocation);
149
        $type = 'AlgoWeb\ODataMetadata\MetadataV3\edmx\TDataServicesType';
150
        $ymlDir = dirname(__DIR__) . $ds . "src" . $ds . "MetadataV3" . $ds . "JMSmetadata";
151
152
        $serializer =
153
            \JMS\Serializer\SerializerBuilder::create()
154
                ->addMetadataDir($ymlDir)
155
                ->build();
156
157
        $d = $serializer->deserialize($document, $type, 'xml');
158
        $this->assertTrue($d instanceof TDataServicesType, get_class($this));
159
        $this->assertTrue($d->isOK($msg), $msg);
160
    }
161
162
    public function testKnownGoodV3MetadataDeserialiseToOk()
163
    {
@@ 162-180 (lines=19) @@
159
        $this->assertTrue($d->isOK($msg), $msg);
160
    }
161
162
    public function testKnownGoodV3MetadataDeserialiseToOk()
163
    {
164
        $ds = DIRECTORY_SEPARATOR;
165
        $msg = null;
166
167
        $docLocation = dirname(__DIR__) . $ds . "tests" . $ds . "exampleV3ServiceMetadata.xml";
168
        $document = file_get_contents($docLocation);
169
        $type = 'AlgoWeb\ODataMetadata\MetadataV3\edmx\Edmx';
170
        $ymlDir = dirname(__DIR__) . $ds . "src" . $ds . "MetadataV3" . $ds . "JMSmetadata";
171
172
        $serializer =
173
            \JMS\Serializer\SerializerBuilder::create()
174
                ->addMetadataDir($ymlDir)
175
                ->build();
176
177
        $d = $serializer->deserialize($document, $type, 'xml');
178
        $this->assertTrue($d instanceof TEdmxType, get_class($d));
179
        $this->assertTrue($d->isOK($msg), $msg);
180
    }
181
182
    public function testKnownGoodV3MetadataDeserialiseToOkSerializeDeserializeRoundTrip()
183
    {