You are here

protected function DrupalTestCase::assertEqual in Drupal 7

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.

565 calls to DrupalTestCase::assertEqual()
ActionLoopTestCase::triggerActions in 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 modules/aggregator/aggregator.test
Creates and ensures that a feed is unique, checks source, and deletes feed.
AggregatorCronTestCase::testCron in modules/aggregator/aggregator.test
Adds feeds and updates them via cron process.
AggregatorTestCase::updateFeedItems in modules/aggregator/aggregator.test
Updates the feed items.
AJAXFormPageCacheTestCase::getFormBuildId in modules/simpletest/tests/ajax.test
Return the build id of the current form.

... See full list

File

modules/simpletest/drupal_web_test_case.php, line 363

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