The method is() fails sometimes to compare float values correctly. Today I compared the result of a class method with a hardcoded float number. When vardump'ing, both numbers seemed to be equal in type and content, but the call of is() failed nevertheless.
The problem is described here: http://www.php.net/manual/en/language.operators.comparison.php#53462
The solution is to compare float values the same way as is done in other programming languages. Add a constant for epsilon to lime_test on line 19:
class lime_test
{
const EPSILON = 0.0000000001;
and change the way of float comparisons in line 93:
public function is($exp1, $exp2, $message = '')
{
if (is_object($exp1) || is_object($exp2))
{
$value = $exp1 == $exp2;
}
elseif (is_float($exp1) && is_float($exp2))
{
$value = abs($exp1 - $exp2) < self::EPSILON;
}
else