Code Duplication    Length = 19-20 lines in 2 locations

tests/EdmxTest.php 2 locations

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