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.

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.

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

... See full list

File

drupal-7.x/modules/simpletest/drupal_web_test_case.php, line 295

Class

DrupalTestCase
Base class for Drupal tests.

Code

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);
}