Esempio n. 1
0
 public function testDeferredEvaluation()
 {
     $doubleOdds = new Container();
     $doubleOdds->filter('Dash\\Functions\\isOdd')->map(function ($n) {
         return $n * 2;
     });
     $this->assertEquals(array(2, 6), $doubleOdds->with(array(1, 2, 3))->value());
     $this->assertEquals(array(14, 18, 22, 26), $doubleOdds->with(array(7, 9, 11, 13))->value());
 }