added assertNull() and assertNotNull()
This commit is contained in:
parent
6737c5cea4
commit
04e4a9ce26
@ -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++;
|
||||
|
Loading…
Reference in New Issue
Block a user