function ClosureComparator::assertEquals
Parameters
mixed $expected:
mixed $actual:
float $delta:
bool $canonicalize:
bool $ignoreCase:
Overrides Comparator::assertEquals
File
-
vendor/
phpspec/ prophecy/ src/ Prophecy/ Comparator/ ClosureComparator.php, line 41
Class
- ClosureComparator
- Closure comparator.
Namespace
Prophecy\ComparatorCode
public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false) : void {
if ($expected !== $actual) {
// Support for sebastian/comparator < 5
if ((new \ReflectionMethod(ComparisonFailure::class, '__construct'))->getNumberOfParameters() >= 6) {
// @phpstan-ignore-next-line
throw new ComparisonFailure($expected, $actual, '', '', false, 'all closures are different if not identical');
}
throw new ComparisonFailure($expected, $actual, '', '', 'all closures are different if not identical');
}
}