function _where($list, $properties) { return Underscore::where($list, $properties); }
/** * @dataProvider peopleDataprovider * @tags collections */ public function testWhere($people, $type, $meta) { $search = ['born' => 1937, 'profession' => 'actor']; // it should return the rows that contains all the properties/values $this->array(_::where($people, static::{"to{$type}"}($search)))->contains(_::get($people, 'jnicholson'))->contains(_::get($people, 'mfreeman'))->hasKeys(['jnicholson', 'mfreeman']); // it should return an empty array if no matches are found $this->array(_::where($people, ['born' => 2002]))->hasSize(0); }