Ejemplo n.º 1
0
 public function test_detect_3()
 {
     // Destructive
     $arr = range(1, 3);
     Enumerator::detect_($arr, function ($key, &$value) {
         $value *= 2;
         return false;
     });
     $this->assertEquals(array(2, 4, 6), $arr);
 }