function DrupalTestCase::assertNull in SimpleTest 5
Same name and namespace in other branches
- 6.2 drupal_web_test_case.php \DrupalTestCase::assertNull()
- 6 drupal_test_case.php \DrupalTestCase::assertNull()
- 7.2 drupal_web_test_case.php \DrupalTestCase::assertNull()
- 7 drupal_web_test_case.php \DrupalTestCase::assertNull()
Will be true if the value is null.
Parameters
null $value Supposedly null value.: @param string $message Message to display. @return boolean True on pass @access public
2 calls to DrupalTestCase::assertNull()
File
- ./
drupal_test_case.php, line 435
Class
- DrupalTestCase
- Test case for typical Drupal tests. Extends WebTestCase for comfortable browser usage but also implements all UnitTestCase methods, I wish WebTestCase would do this.
Code
function assertNull($value, $message = "%s") {
$dumper =& new SimpleDumper();
$message = sprintf($message, "[" . $dumper
->describeValue($value) . "] should be null");
return $this
->assertTrue(!isset($value), $message);
}