You are here

final class ClosureComparator in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpspec/prophecy/src/Prophecy/Comparator/ClosureComparator.php \Prophecy\Comparator\ClosureComparator

Closure comparator.

@author Konstantin Kudryashov <ever.zet@gmail.com>

Hierarchy

Expanded class hierarchy of ClosureComparator

File

vendor/phpspec/prophecy/src/Prophecy/Comparator/ClosureComparator.php, line 22

Namespace

Prophecy\Comparator
View source
final class ClosureComparator extends Comparator {
  public function accepts($expected, $actual) {
    return is_object($expected) && $expected instanceof \Closure && is_object($actual) && $actual instanceof \Closure;
  }
  public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false) {
    throw new ComparisonFailure($expected, $actual, '', '', false, 'all closures are born different');
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ClosureComparator::accepts public function Returns whether the comparator can compare two values. Overrides Comparator::accepts
ClosureComparator::assertEquals public function Asserts that two values are equal. Overrides Comparator::assertEquals
Comparator::$exporter protected property
Comparator::$factory protected property
Comparator::setFactory public function
Comparator::__construct public function