You are here

function DrupalTestCase::assertNotNull in SimpleTest 6

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. 7.2 drupal_web_test_case.php \DrupalTestCase::assertNotNull()
  4. 7 drupal_web_test_case.php \DrupalTestCase::assertNotNull()

Will be true if the value is set.

Parameters

mixed $value Supposedly set value.: @param string $message Message to display. @return boolean True on pass. @access public

13 calls to DrupalTestCase::assertNotNull()
BlogAPIModuleTestCase::add_term in tests/blogapi_module.test
Add a taxonomy term to vocabulary.
BlogAPIModuleTestCase::add_vocabulary in tests/blogapi_module.test
Add taxonomy vocabulary.
BookModuleTestCase::checkBookNode in tests/book_module.test
Checks the outline of sub-pages; previous, up, and next; and check printer friendly version.
BookModuleTestCase::createBookNode in tests/book_module.test
Create book node.
PageCreationTest::testPageCreation in tests/page_creation.test

... See full list

File

./drupal_test_case.php, line 574

Class

DrupalTestCase
Test case for typical Drupal tests. Extends WebTestCase for comfortable browser usage but also implements all UnitTestCase methods, I wish WebTestCase would do this.

Code

function assertNotNull($value, $message = "%s") {
  $dumper =& new SimpleDumper();
  $message = sprintf($message, "[" . $dumper
    ->describeValue($value) . "] should not be null");
  return $this
    ->assertTrue(isset($value), $message);
}