You are here

protected function DrupalTestCase::assertNull in SimpleTest 7

Same name and namespace in other branches
  1. 5 drupal_test_case.php \DrupalTestCase::assertNull()
  2. 6.2 drupal_web_test_case.php \DrupalTestCase::assertNull()
  3. 6 drupal_test_case.php \DrupalTestCase::assertNull()
  4. 7.2 drupal_web_test_case.php \DrupalTestCase::assertNull()

Check to see if a value is NULL.

Parameters

$value: The value on which the assertion is to be done.

$message: The message to display along with the assertion.

$group: The type of assertion - examples are "Browser", "PHP".

Return value

TRUE if the assertion succeeded, FALSE otherwise.

3 calls to DrupalTestCase::assertNull()
DatabaseTaggingTestCase::testMetaData in tests/database_test.test
Test that we can attach meta data to a query object.
FormsTestTypeCase::testFormCheckboxValue in tests/form.test
Test form_type_checkbox_value() function for expected behavior.
SessionTestCase::assertSessionCookie in tests/session.test
Assert whether the SimpleTest browser sent a session cookie.

File

./drupal_web_test_case.php, line 246

Class

DrupalTestCase
Base class for Drupal tests.

Code

protected function assertNull($value, $message = '', $group = 'Other') {
  return $this
    ->assert(!isset($value), $message ? $message : t('Value is NULL'), $group);
}