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.

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.

493 calls to DrupalTestCase::assertEqual()
ActionLoopTestCase::triggerActions in drupal-7.x/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-7.x/modules/aggregator/aggregator.test
Creates and ensures that a feed is unique, checks source, and deletes feed.
AggregatorCronTestCase::testCron in drupal-7.x/modules/aggregator/aggregator.test
Adds feeds and updates them via cron process.
AggregatorTestCase::updateFeedItems in drupal-7.x/modules/aggregator/aggregator.test
Updates the feed items.
AJAXFrameworkTestCase::testAJAXRender in drupal-7.x/modules/simpletest/tests/ajax.test
Test that ajax_render() returns JavaScript settings generated during the page request.

... See full list

File

drupal-7.x/modules/simpletest/drupal_web_test_case.php, line 329

Class

DrupalTestCase
Base class for Drupal tests.

Code

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