You are here

protected function DrupalTestCase::assertEqual in SimpleTest 7

Same name and namespace in other branches
  1. 5 drupal_test_case.php \DrupalTestCase::assertEqual()
  2. 6.2 drupal_web_test_case.php \DrupalTestCase::assertEqual()
  3. 6 drupal_test_case.php \DrupalTestCase::assertEqual()
  4. 7.2 drupal_web_test_case.php \DrupalTestCase::assertEqual()

Check to see if two values are equal.

Parameters

$first: The first value to check.

$second: The second value to check.

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

197 calls to DrupalTestCase::assertEqual()
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.
AJAXCommandsTestCase::testAJAXRender in tests/ajax.test
Test ajax_command_settings().
AJAXFrameworkTestCase::testAJAXRender in tests/ajax.test
Test proper passing of JavaScript settings via ajax_render().
AJAXFrameworkTestCase::testAJAXRenderError in tests/ajax.test
Test behavior of ajax_render_error().
BootstrapPageCacheTestCase::testConditionalRequests in tests/bootstrap.test
Test support for requests containing If-Modified-Since and If-None-Match headers.

... See full list

File

./drupal_web_test_case.php, line 280

Class

DrupalTestCase
Base class for Drupal tests.

Code

protected function assertEqual($first, $second, $message = '', $group = 'Other') {
  return $this
    ->assert($first == $second, $message ? $message : t('First value is equal to second value'), $group);
}