protected function 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.

14 calls to DrupalTestCase::assertNull()
BootstrapGetFilenameTestCase::testDrupalGetFilename in drupal/modules/simpletest/tests/bootstrap.test
Test that drupal_get_filename() works correctly when the file is not found in the database.
BootstrapGetFilenameWebTestCase::testDrupalGetFilename in drupal/modules/simpletest/tests/bootstrap.test
Test that drupal_get_filename() works correctly with a full Drupal site.
CronRunTestCase::testCronCacheExpiration in drupal/modules/system/system.test
Tests that hook_flush_caches() is not invoked on every single cron run.
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.

... See full list

File

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

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