You are here

protected function DrupalTestCase::assertEqual in SimpleTest 7.2

Same name and namespace in other branches
  1. 5 drupal_test_case.php \DrupalTestCase::assertEqual()
  2. 6.2 drupal_web_test_case.php \DrupalTestCase::assertEqual()
  3. 6 drupal_test_case.php \DrupalTestCase::assertEqual()
  4. 7 drupal_web_test_case.php \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.

8 calls to DrupalTestCase::assertEqual()
DrupalWebTestCase::assertTitle in ./drupal_web_test_case.php
Pass if the page title is the given string.
DrupalWebTestCase::assertUrl in ./drupal_web_test_case.php
Pass if the internal browser's URL matches the given path.
DrupalWebTestCase::drupalCreateContentType in ./drupal_web_test_case.php
Creates a custom content type based on default settings.
SimpleTestFunctionalTest::confirmStubTestResults in ./simpletest.test
Confirm that the stub test produced the desired results.
SimpleTestFunctionalTest::testInternalBrowser in ./simpletest.test
Test the internal browsers functionality.

... See full list

File

./drupal_web_test_case.php, line 310
Provides DrupalTestCase, DrupalUnitTestCase, and DrupalWebTestCase classes.

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