mageekguy\atoum\tests\units\asserters\phpFloat::testIsZero PHP Method

testIsZero() public method

public testIsZero ( )
    public function testIsZero()
    {
        $this->given($asserter = $this->newTestedInstance->setLocale($locale = new \mock\atoum\locale())->setDiff($diff = new \mock\atoum\tools\diffs\variable())->setAnalyzer($analyzer = new \mock\atoum\tools\variable\analyzer()))->then->exception(function () use($asserter) {
            $asserter->isZero();
        })->isInstanceOf('mageekguy\\atoum\\exceptions\\logic')->hasMessage('Value is undefined')->exception(function () use($asserter) {
            $asserter->isZero;
        })->isInstanceOf('mageekguy\\atoum\\exceptions\\logic')->hasMessage('Value is undefined')->exception(function () use($asserter) {
            $asserter->ISZerO;
        })->isInstanceOf('mageekguy\\atoum\\exceptions\\logic')->hasMessage('Value is undefined')->if($asserter->setWith(0.0))->then->object($asserter->isZero())->isIdenticalTo($asserter)->object($asserter->isZero)->isIdenticalTo($asserter)->if($this->calling($locale)->_ = $notZero = uniqid(), $this->calling($analyzer)->getTypeOf = $type = uniqid(), $this->calling($diff)->__toString = $diffValue = uniqid(), $asserter->setWith($value = (double) rand(1, PHP_INT_MAX)))->then->exception(function () use($asserter) {
            $asserter->isZero();
        })->isInstanceOf('mageekguy\\atoum\\asserter\\exception')->hasMessage($notZero . PHP_EOL . $diffValue)->mock($locale)->call('_')->withArguments('%s is not equal to %s', $asserter, $type)->once->mock($analyzer)->call('getTypeOf')->withArguments(0.0)->once->mock($diff)->call('setExpected')->withArguments(0.0)->once->call('setActual')->withArguments($value)->once->exception(function () use($asserter) {
            $asserter->isZero;
        })->isInstanceOf('mageekguy\\atoum\\asserter\\exception')->hasMessage($notZero . PHP_EOL . $diffValue)->mock($locale)->call('_')->withArguments('%s is not equal to %s', $asserter, $type)->twice->mock($analyzer)->call('getTypeOf')->withArguments(0.0)->twice->mock($diff)->call('setExpected')->withArguments(0.0)->twice->call('setActual')->withArguments($value)->twice->exception(function () use($asserter, &$failMessage) {
            $asserter->isZero($failMessage = uniqid());
        })->isInstanceOf('mageekguy\\atoum\\asserter\\exception')->hasMessage($failMessage . PHP_EOL . $diffValue);
    }