public function test_find_returns_false_if_no_match() { $isOverTen = function (TestClassA $item) { return $item->getValue() > 10; }; $result = $this->col->find($isOverTen); $this->assertFalse($result); }
/** * Finds and returns the first item in the collection that satisfies the callback. * * @param callback $condition The condition critera to test each item, requires one argument that represents the Collection item during iteration. * @return {{foo}} The first item that satisfied the condition or false if no object was found */ public function find(callable $condition) { return parent::find($condition); }