You are here

public function NumberComparator::assertEquals in Commerce Core 8.2

File

modules/price/src/Comparator/NumberComparator.php, line 28

Class

NumberComparator
Provides a PHPUnit comparator for numbers cast to strings.

Namespace

Drupal\commerce_price\Comparator

Code

public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = FALSE, $ignoreCase = FALSE) {
  if ($expected != $actual) {
    throw new ComparisonFailure($expected, $actual, '', '', FALSE, sprintf('Failed asserting that "%s" matches expected "%s".', $actual, $expected));
  }
}