diff --git a/src/Assert.php b/src/Assert.php index 58d01589..b8fa12ac 100644 --- a/src/Assert.php +++ b/src/Assert.php @@ -35,10 +35,16 @@ class Assert return $ret; } + public function isNull($actual) + { + if ($actual !== null and $actual !== false) + $this->fail('Assertion failed. Expected: NULL, got: "' . $actual . '"'); + } + public function isNotNull($actual) { if ($actual === null or $actual === false) - $this->fail('Assertion failed. Expected: NULL, got: "' . $actual . '"'); + $this->fail('Assertion failed. Expected: not NULL, got: "' . $actual . '"'); } public function isTrue($actual)