/** * @dataProvider simpleArrayProvider */ public function testSortKeysDesc(array $array) { $ma = new MutableArray($array); $copiedMa = $ma->sortKeys(SORT_DESC, SORT_REGULAR); krsort($array, SORT_REGULAR); $this->assertTrue($copiedMa === $ma); $this->assertTrue($array === $ma->toArray()); }
/** * @dataProvider simpleArrayProvider * * @param array $array */ public function testSortKeysDesc(array $array) { $arrayzy = new A($array); $resultArrayzy = $arrayzy->sortKeys(SORT_DESC, SORT_REGULAR); $resultArray = $array; krsort($resultArray, SORT_REGULAR); $this->assertMutable($arrayzy, $resultArrayzy, $resultArray); }