DrupalTestCase::assertEqual

  1. drupal
    1. 8
    2. 7
Versions
7 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.

Code

modules/simpletest/drupal_web_test_case.php, line 305

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