Exemplo n.º 1
0
 function it_can_walk_throught_an_array_modifying_its_values()
 {
     $array = [1, 2, 3];
     $array = $this->walk($array, function (&$value, $key) {
         $value += 10;
     });
     if (Not::equalTo([11, 12, 13], $array->getWrappedObject())) {
         throw new \Exception();
     }
 }
Exemplo n.º 2
0
 static function unless($condition, \Exception $exception)
 {
     self::when(Not::true($condition), $exception);
 }