protected function DrupalTestCase::assertTrue in SimpleTest 6.2
Same name and namespace in other branches
- 7.2 drupal_web_test_case.php \DrupalTestCase::assertTrue()
- 7 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.
19 calls to DrupalTestCase::assertTrue()
- DrupalWebTestCase::assertFieldByXPath in ./
drupal_web_test_case.php - Asserts that a field exists in the current page by the given XPath.
- DrupalWebTestCase::assertFieldChecked in ./
drupal_web_test_case.php - Asserts that a checkbox field in the current page is checked.
- DrupalWebTestCase::assertMail in ./
drupal_web_test_case.php - Asserts that the most recently sent e-mail message has the given value.
- DrupalWebTestCase::assertMailPattern in ./
drupal_web_test_case.php - Asserts that the most recently sent e-mail message has the pattern in it.
- DrupalWebTestCase::assertMailString in ./
drupal_web_test_case.php - Asserts that the most recently sent e-mail message has the string in it.
File
- ./
drupal_web_test_case.php, line 249
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);
}