Code Duplication    Length = 14-14 lines in 2 locations

tests/GraphNode/GraphNodeTest.php 1 location

@@ 200-213 (lines=14) @@
197
        $this->assertEquals('baz', $graphNode->getField('faz'));
198
    }
199
200
    public function testAGraphNodeCanBeIteratedOver()
201
    {
202
        $graphNode = new GraphNode(['foo' => 'bar', 'faz' => 'baz']);
203
204
        $this->assertInstanceOf(\IteratorAggregate::class, $graphNode);
205
206
        $newArray = [];
207
208
        foreach ($graphNode as $k => $v) {
209
            $newArray[$k] = $v;
210
        }
211
212
        $this->assertEquals(['foo' => 'bar', 'faz' => 'baz'], $newArray);
213
    }
214
}
215

tests/GraphNode/GraphEdgeTest.php 1 location

@@ 206-219 (lines=14) @@
203
        $this->assertEquals('baz', $graphEdge['faz']);
204
    }
205
206
    public function testACollectionCanBeIteratedOver()
207
    {
208
        $graphEdge = new GraphEdge($this->request, ['foo' => 'bar', 'faz' => 'baz']);
209
210
        $this->assertInstanceOf(\IteratorAggregate::class, $graphEdge);
211
212
        $newArray = [];
213
214
        foreach ($graphEdge as $k => $v) {
215
            $newArray[$k] = $v;
216
        }
217
218
        $this->assertEquals(['foo' => 'bar', 'faz' => 'baz'], $newArray);
219
    }
220
}
221