public static function notInArray($array) { return function ($value) use($array) { return !in_array($value, $array); }; }
/** * @test */ public function shouldCheckIsNotInArray() { //given $array = array('white', 'snow'); //when $result = Functions::call(Functions::notInArray($array), 'missing'); //then $this->assertTrue($result); }