Esempio n. 1
0
 /**
  * @dataProvider simpleArrayProvider
  */
 public function testReduce(array $array)
 {
     $callable = function ($carry, $item) {
         $carry .= '-' . $item;
         return $carry;
     };
     $reducedArray = array_reduce($array, $callable, 'array');
     $ma = new MutableArray($array);
     $this->assertTrue($reducedArray === $ma->reduce($callable, 'array'));
 }