function DrupalTestCase::assertIdentical

Check to see if two values are identical.

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.

136 calls to DrupalTestCase::assertIdentical()
AJAXFrameworkTestCase::testLazyLoad in modules/simpletest/tests/ajax.test
Test that new JavaScript and CSS files added during an AJAX request are returned.
ArrayDiffUnitTest::testArrayDiffAssocRecursive in modules/simpletest/tests/common.test
Tests drupal_array_diff_assoc_recursive().
BootstrapDestinationTestCase::testDestination in modules/simpletest/tests/bootstrap.test
Tests that $_GET/$_REQUEST['destination'] only contain internal URLs.
BootstrapGetFilenameTestCase::testDrupalGetFilename in modules/simpletest/tests/bootstrap.test
Test that drupal_get_filename() works correctly when the file is not found in the database.
BootstrapGetFilenameWebTestCase::testDrupalGetFilename in modules/simpletest/tests/bootstrap.test
Test that drupal_get_filename() works correctly with a full Drupal site.

... See full list

File

modules/simpletest/drupal_web_test_case.php, line 424

Class

DrupalTestCase
Base class for Drupal tests.

Code

protected function assertIdentical($first, $second, $message = '', $group = 'Other') {
  return $this->assert($first === $second, $message ? $message : t('Value @first is identical 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.