protected function DrupalTestCase::assertNotNull

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

16 calls to DrupalTestCase::assertNotNull()
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.
DatabaseSelectTestCase::testSimpleSelectMultipleFields in drupal/modules/simpletest/tests/database_test.test
Test adding multiple fields to a select statement at the same time.
FieldSqlStorageTestCase::testFieldSqlStorageMultipleConditionsDifferentColumns in drupal/modules/field/modules/field_sql_storage/field_sql_storage.test
Test handling multiple conditions on multiple columns of one field.

... See full list

File

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

Class

DrupalTestCase
Base class for Drupal tests.

Code

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