You are here

function DrupalTestCase::assertIdentical in SimpleTest 6

Same name and namespace in other branches
  1. 5 drupal_test_case.php \DrupalTestCase::assertIdentical()
  2. 6.2 drupal_web_test_case.php \DrupalTestCase::assertIdentical()
  3. 7.2 drupal_web_test_case.php \DrupalTestCase::assertIdentical()
  4. 7 drupal_web_test_case.php \DrupalTestCase::assertIdentical()

Will trigger a pass if the two parameters have the same value and same type. Otherwise a fail.

Parameters

mixed $first Value to compare.: @param mixed $second Value to compare. @param string $message Message to display. @return boolean True on pass @access public

2 calls to DrupalTestCase::assertIdentical()
NodeTeaserTest::callNodeTeaser in tests/node_teaser.test
Calls node_teaser() and asserts that the expected teaser is returned.
XMLRPCValidator1Test::test_run_all_tests in tests/xmlrpc_validator1.test

File

./drupal_test_case.php, line 657

Class

DrupalTestCase
Test case for typical Drupal tests. Extends WebTestCase for comfortable browser usage but also implements all UnitTestCase methods, I wish WebTestCase would do this.

Code

function assertIdentical($first, $second, $message = "%s") {
  return $this
    ->assertExpectation(new IdenticalExpectation($first), $second, $message);
}