/** * @dataProvider simpleArrayProvider */ public function testReverse(array $array) { $reversedArray = array_reverse($array); $ma = new ImmutableArray($array); $copiedMa = $ma->reverse(); $this->assertTrue($copiedMa !== $ma); $this->assertTrue($reversedArray === $copiedMa->toArray()); }
/** * @dataProvider simpleArrayProvider * * @param array $array */ public function testReverse(array $array) { $arrayzy = new A($array); $resultArrayzy = $arrayzy->reverse(); $resultArray = array_reverse($array); $this->assertImmutable($arrayzy, $resultArrayzy, $array, $resultArray); }