public function testMap() { $this->collection->map(function ($item) { return sprintf('%s %s', $item['first_name'], $item['last_name']); }); $this->assertEquals(['john smith', 'kara trace', 'phil mcKay', 'rose smith'], $this->collection->toArray()); }
/** * {@inheritdoc} */ public function map(Closure $func) { $this->initialize(); return $this->coll->map($func); }
/** * {@inheritdoc} */ public function map(Closure $func) { $this->_initialize(); $result = $this->_coll->map($func); $this->_changed(); return $result; }