function _matches($properties) { return Underscore::matches($properties); }
public function testMatch() { $fn = _::matches(['valid' => 1, 'paid' => 0]); $this->typeTolerant(['valid' => 1, 'name' => 'foo', 'paid' => 0], null, function ($in) use($fn) { $this->boolean($fn($in))->isTrue(); }, [0, -1]); $this->typeTolerant(['valid' => 0, 'name' => 'foo', 'paid' => 1], null, function ($in) use($fn) { $this->boolean($fn($in))->isFalse(); }, [0, -1]); }