protected function DrupalTestCase::assertNotNull

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

Check to see if a value is not 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.

14 calls to DrupalTestCase::assertNotNull()
BlockTestCase::testBlock in drupal/modules/block/block.test
Test configuring and moving a module-define block to specific regions.
BlockTestCase::testCustomBlock in drupal/modules/block/block.test
Test creating custom block, moving it to a specific region and then deleting it.
BookTestCase::createBookNode in drupal/modules/book/book.test
Creates a book node.
DatabaseConnectionTestCase::testConnectionRouting in drupal/modules/simpletest/tests/database_test.test
Test that connections return appropriate connection objects.
DatabaseSelectTestCase::testSimpleSelectAllFields in drupal/modules/simpletest/tests/database_test.test
Test adding all fields from a given table to a select statement.

... See full list


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


Base class for Drupal tests.


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