protected function DrupalTestCase::assertEqual

7.x drupal_web_test_case.php protected DrupalTestCase::assertEqual($first, $second, $message = '', $group = 'Other')

Check to see if two values are equal.


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

501 calls to DrupalTestCase::assertEqual()
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.
AggregatorCronTestCase::testCron in drupal/modules/aggregator/aggregator.test
Adds feeds and updates them via cron process.
AggregatorTestCase::updateFeedItems in drupal/modules/aggregator/aggregator.test
Updates the feed items.
AJAXFrameworkTestCase::testAJAXRender in drupal/modules/simpletest/tests/ajax.test
Test that ajax_render() returns JavaScript settings generated during the page request.

... See full list


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


Base class for Drupal tests.


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