예제 #1
0
 function testCollectionApply()
 {
     $data = ['foo' => 'bar'];
     $collection = new qtil\Collection();
     $collection->merge($data);
     $collection->apply(function (&$val) {
         $val = strtoupper($val);
     });
     $this->assertEquals('BAR', $collection['foo']);
 }