protected function DrupalTestCase::assertNull

7.x drupal_web_test_case.php protected DrupalTestCase::assertNull($value, $message = '', $group = 'Other')

Check to see if a value is NULL.


$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.

9 calls to DrupalTestCase::assertNull()
DatabaseEmptyStatementTestCase::testEmpty in drupal/modules/simpletest/tests/database_test.test
Test that the empty result set behaves as empty.
DatabaseTaggingTestCase::testMetaData in drupal/modules/simpletest/tests/database_test.test
Test that we can attach meta data to a query object.
DatabaseUpdateTestCase::testSimpleNullUpdate in drupal/modules/simpletest/tests/database_test.test
Confirm updating to NULL.
FieldInfoTestCase::testInstanceDisabledEntityType in drupal/modules/field/tests/field.test
Test that instances on disabled entity types are filtered out.
FieldUIManageFieldsTestCase::testDeleteField in drupal/modules/field_ui/field_ui.test
Tests that deletion removes fields and instances as expected.

... See full list


drupal/modules/simpletest/drupal_web_test_case.php, line 295


Base class for Drupal tests.


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