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.

17 calls to DrupalTestCase::assertNotNull()
BookTestCase::createBookNode in modules/book/book.test
Creates a book node.
DatabaseConnectionTestCase::testConnectionRouting in modules/simpletest/tests/database_test.test
Test that connections return appropriate connection objects.
DatabaseSelectTestCase::testSimpleSelectAllFields in modules/simpletest/tests/database_test.test
Test adding all fields from a given table to a select statement.
DatabaseSelectTestCase::testSimpleSelectMultipleFields in modules/simpletest/tests/database_test.test
Test adding multiple fields to a select statement at the same time.
FieldSqlStorageTestCase::testFieldSqlStorageMultipleConditionsDifferentColumns in modules/field/modules/field_sql_storage/field_sql_storage.test
Test handling multiple conditions on multiple columns of one field.

... See full list

File

modules/simpletest/drupal_web_test_case.php, line 370

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.