예제 #1
0
 public function testMap()
 {
     $this->properties->map(function ($key, $item) {
         return "mapped_" . $item;
     });
     $this->assertEquals(['foo1' => 'mapped_bar1', 'foo2' => 'mapped_bar2'], $this->properties->toArray());
 }
예제 #2
0
파일: MapTest.php 프로젝트: haldayne/boost
 /** @dataProvider provides_valid_collection */
 public function test_toArray($collection, array $array)
 {
     $c = new Map($collection);
     $this->assertSame($array, $c->toArray());
 }