You are here

public function MarkupInterfaceComparator::assertEquals in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/TestTools/Comparator/MarkupInterfaceComparator.php \Drupal\TestTools\Comparator\MarkupInterfaceComparator::assertEquals()
  2. 9 core/tests/Drupal/TestTools/Comparator/MarkupInterfaceComparator.php \Drupal\TestTools\Comparator\MarkupInterfaceComparator::assertEquals()

File

core/tests/Drupal/TestTools/Comparator/MarkupInterfaceComparator.php, line 27

Class

MarkupInterfaceComparator
Compares MarkupInterface objects for equality.

Namespace

Drupal\TestTools\Comparator

Code

public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = FALSE, $ignoreCase = FALSE) {
  $expected_safe = (string) $expected;
  $actual_safe = (string) $actual;
  $comparator = $this->factory
    ->getComparatorFor($expected_safe, $actual_safe);
  $comparator
    ->assertEquals($expected_safe, $actual_safe, $delta, $canonicalize, $ignoreCase);
}