Beispiel #1
0
/**
 * Matches if value is a number equal to $value within some range of
 * acceptable error $delta.
 */
function closeTo($value, $delta)
{
    require_once 'Hamcrest/Number/IsCloseTo.php';
    return Hamcrest_Number_IsCloseTo::closeTo($value, $delta);
}
 protected function createMatcher()
 {
     $irrelevant = 0.1;
     return Hamcrest_Number_IsCloseTo::closeTo($irrelevant, $irrelevant);
 }