function _findWhere($list, $properties)
{
    return Underscore::findWhere($list, $properties);
}
Пример #2
0
 /**
  * @dataProvider peopleDataProvider
  * @tags collections
  */
 public function testFindWhere($people, $type, $meta)
 {
     $search = ['born' => 1937, 'profession' => 'actor'];
     // it should return the first row that contains all the properties/values
     $this->variable(_::findWhere($people, static::{"to{$type}"}($search)))->isEqualTo(_::get($people, 'jnicholson'));
     // it should return null if no match is found
     $this->variable(_::findWhere($people, ['born' => 2002]))->isNull();
 }