protected function 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.

544 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.
AJAXFormPageCacheTestCase::getFormBuildId in drupal/modules/simpletest/tests/ajax.test
Return the build id of the current form.

... See full list

File

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

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