You are here

protected function DrupalTestCase::assertTrue in Drupal 7

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

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.

532 calls to DrupalTestCase::assertTrue()
ActionLoopTestCase::triggerActions in 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 modules/aggregator/aggregator.test
Creates and ensures that a feed is unique, checks source, and deletes feed.
AddFeedTestCase::testAddLongFeed in modules/aggregator/aggregator.test
Tests feeds with very long URLs.
AggregatorRenderingTestCase::testFeedPage in modules/aggregator/aggregator.test
Creates a feed and checks that feed's page.
AggregatorTestCase::createFeed in modules/aggregator/aggregator.test
Creates an aggregator feed.

... See full list

File

modules/simpletest/drupal_web_test_case.php, line 297

Class

DrupalTestCase
Base class for Drupal tests.

Code

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