Chris@0: Chris@0: * Marcello Duarte Chris@0: * Chris@0: * For the full copyright and license information, please view the LICENSE Chris@0: * file that was distributed with this source code. Chris@0: */ Chris@0: Chris@0: namespace Prophecy\Comparator; Chris@0: Chris@0: use Prophecy\Prophecy\ProphecyInterface; Chris@0: use SebastianBergmann\Comparator\ObjectComparator; Chris@0: Chris@0: class ProphecyComparator extends ObjectComparator Chris@0: { Chris@0: public function accepts($expected, $actual) Chris@0: { Chris@0: return is_object($expected) && is_object($actual) && $actual instanceof ProphecyInterface; Chris@0: } Chris@0: Chris@0: public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false, array &$processed = array()) Chris@0: { Chris@0: parent::assertEquals($expected, $actual->reveal(), $delta, $canonicalize, $ignoreCase, $processed); Chris@0: } Chris@0: }