public function CollectionTest::testMap in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/doctrine/collections/tests/Doctrine/Tests/Common/Collections/CollectionTest.php \Doctrine\Tests\Common\Collections\CollectionTest::testMap()
File
- vendor/
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());
}