function DrupalTestCase::assertNotNull in SimpleTest 6
Same name and namespace in other branches
- 5 drupal_test_case.php \DrupalTestCase::assertNotNull()
- 6.2 drupal_web_test_case.php \DrupalTestCase::assertNotNull()
- 7.2 drupal_web_test_case.php \DrupalTestCase::assertNotNull()
- 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
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);
}