Esempio n. 1
0
 /**
  * @dataProvider simpleArrayProvider
  */
 public function testSortKeysDesc(array $array)
 {
     $ma = new ImmutableArray($array);
     $copiedMa = $ma->sortKeys(SORT_DESC, SORT_REGULAR);
     krsort($array, SORT_REGULAR);
     $this->assertTrue($copiedMa !== $ma);
     $this->assertTrue($array === $copiedMa->toArray());
 }
Esempio n. 2
0
 /**
  * @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->assertImmutable($arrayzy, $resultArrayzy, $array, $resultArray);
 }