You are here

protected function DrupalTestCase::assertTrue in SimpleTest 7

Same name and namespace in other branches
  1. 6.2 drupal_web_test_case.php \DrupalTestCase::assertTrue()
  2. 7.2 drupal_web_test_case.php \DrupalTestCase::assertTrue()

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.

143 calls to DrupalTestCase::assertTrue()
ActionLoopTestCase::triggerActions in 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 default of 35 times.
BootstrapIPAddressTestCase::testIPAddressHost in tests/bootstrap.test
test IP Address and hostname
BootstrapPageCacheTestCase::testPageCache in tests/bootstrap.test
Test cache headers.
BootstrapTimerTestCase::testTimer in tests/bootstrap.test
Test timer_read() to ensure it properly accumulates time when the timer started and stopped multiple times.
CacheClearCase::testClearArray in tests/cache.test
Test clearing using an array.

... See full list

File

./drupal_web_test_case.php, line 214

Class

DrupalTestCase
Base class for Drupal tests.

Code

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