public function CollectionTest::testMap in Plug 7
File
- lib/
doctrine/ collections/ tests/ Doctrine/ Tests/ Common/ Collections/ CollectionTest.php, line 51
Class
Namespace
Doctrine\Tests\Common\CollectionsCode
public function testMap() {
$this->collection
->add(1);
$this->collection
->add(2);
$res = $this->collection
->map(function ($e) {
return $e * 2;
});
$this
->assertEquals(array(
2,
4,
), $res
->toArray());
}