1
0
mirror of synced 2024-12-13 06:46:03 +03:00

added assertNull() and assertNotNull()

This commit is contained in:
jepso 2008-01-18 19:35:15 +00:00
parent 6737c5cea4
commit 04e4a9ce26

View File

@ -62,6 +62,25 @@ class UnitTestCase
$this->_fail();
}
}
public function assertNull($expr)
{
if (is_null($expr)) {
$this->pass();
} else {
$this->fail();
}
}
public function assertNotNull($expr)
{
if (is_null($expr)) {
$this->fail();
} else {
$this->pass();
}
}
public function pass()
{
$this->_passed++;