public function test_max_2() { // Basic test $array = array('albatross', 'dog', 'horse'); $ret = Enumerator::max($array, function ($val1, $val2) { return strcmp(strlen($val1), strlen($val2)); }); // albatross $this->assertEquals('albatross', $ret); }