/** * @dataProvider providerReverse * @param array $originalValues * @param array $expectedValues */ public function testReverseIterative(array $originalValues, array $expectedValues) { $list = new LinkedList($originalValues); $this->assertEquals($originalValues, $list->toArray()); $list->reverseIterative(); $this->assertEquals($expectedValues, $list->toArray()); }