You are here

protected function DrupalTestCase::assertNotNull in SimpleTest 7

Same name and namespace in other branches
  1. 5 drupal_test_case.php \DrupalTestCase::assertNotNull()
  2. 6.2 drupal_web_test_case.php \DrupalTestCase::assertNotNull()
  3. 6 drupal_test_case.php \DrupalTestCase::assertNotNull()
  4. 7.2 drupal_web_test_case.php \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.

5 calls to DrupalTestCase::assertNotNull()
DatabaseConnectionTestCase::testConnectionRouting in tests/database_test.test
Test that connections return appropriate connection objects.
DatabaseSelectTestCase::testSimpleSelectAllFields in tests/database_test.test
Test adding all fields from a given table to a select statement.
DatabaseSelectTestCase::testSimpleSelectMultipleFields in tests/database_test.test
Test adding multiple fields to a select statement at the same time.
FileSaveTest::testFileSave in tests/file.test
SessionTestCase::assertSessionCookie in tests/session.test
Assert whether the SimpleTest browser sent a session cookie.

File

./drupal_web_test_case.php, line 262

Class

DrupalTestCase
Base class for Drupal tests.

Code

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