protected function DrupalTestCase::assertTrue

7.x drupal_web_test_case.php protected DrupalTestCase::assertTrue($value, $message = '', $group = 'Other')

Check to see if a value is not false (not an empty string, 0, NULL, or FALSE).


$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.

481 calls to DrupalTestCase::assertTrue()
ActionLoopTestCase::triggerActions in drupal/modules/simpletest/tests/actions.test
Create an infinite loop by causing a watchdog message to be set, which causes the actions to be triggered again, up to actions_max_stack times.
AddFeedTestCase::testAddFeed in drupal/modules/aggregator/aggregator.test
Creates and ensures that a feed is unique, checks source, and deletes feed.
AddFeedTestCase::testAddLongFeed in drupal/modules/aggregator/aggregator.test
Tests feeds with very long URLs.
AggregatorRenderingTestCase::testFeedPage in drupal/modules/aggregator/aggregator.test
Creates a feed and checks that feed's page.
AggregatorTestCase::createFeed in drupal/modules/aggregator/aggregator.test
Creates an aggregator feed.

... See full list


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


Base class for Drupal tests.


protected function assertTrue($value, $message = '', $group = 'Other') {
  return $this->assert((bool) $value, $message ? $message : t('Value @value is TRUE.', array('@value' => var_export($value, TRUE))), $group);