PHPUnit5.0中文手册A. 断言assertNan()
上一篇:assertLessThanO... 下一篇:assertNull()

assertNan()

assertNan(mixed $variable[, string $message = ''])

$variable 不是 NAN 时报告错误,错误讯息由 $message 指定。

Example A.31. assertNan() 的用法


assertNan(1);
    }
}
?>
phpunit NanTest
PHPUnit 5.0.0 by Sebastian Bergmann and contributors.
F
Time: 0 seconds, Memory: 5.00Mb
There was 1 failure:
1) NanTest::testFailure
Failed asserting that 1 is nan.
/home/sb/NanTest.php:6
FAILURES!
Tests: 1, Assertions: 1, Failures: 1.
上一篇:assertLessThanO... 下一篇:assertNull()