function _toArray($list) { return Underscore::toArray($list); }
/** * @tags arrays */ public function testZip() { // it should merge together the values of each of the arrays with the values at the corresponding position $values = [['moe', 'larry', 'curly'], [30, 40, 50], [true, false, false]]; $this->typeTolerant($values, null, function ($in, $out) { $in = _::toArray($in); $this->array(_::zip($in[0], $in[1], $in[2]))->isEqualTo([['moe', 30, true], ['larry', 40, false], ['curly', 50, false]]); }, [0, -1]); // it should return an empty array if the list of arrays to zip is empty $this->array(_::zip())->isEqualTo([]); }