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.

587 calls to DrupalTestCase::assertEqual()
AccessDeniedTestCase::testAccessDenied in modules/system/system.test
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.

... See full list

File

modules/simpletest/drupal_web_test_case.php, line 388

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.