4 * This file is part of the Prophecy.
5 * (c) Konstantin Kudryashov <ever.zet@gmail.com>
6 * Marcello Duarte <marcello.duarte@gmail.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Prophecy\Comparator;
14 use Prophecy\Prophecy\ProphecyInterface;
15 use SebastianBergmann\Comparator\ObjectComparator;
17 class ProphecyComparator extends ObjectComparator
19 public function accepts($expected, $actual)
21 return is_object($expected) && is_object($actual) && $actual instanceof ProphecyInterface;
24 public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false, array &$processed = array())
26 parent::assertEquals($expected, $actual->reveal(), $delta, $canonicalize, $ignoreCase, $processed);