3 * This file is part of the Comparator package.
5 * (c) Sebastian Bergmann <sebastian@phpunit.de>
7 * For the full copyright and license information, please view the LICENSE
8 * file that was distributed with this source code.
11 namespace SebastianBergmann\Comparator;
14 * Compares Exception instances for equality.
16 class ExceptionComparator extends ObjectComparator
19 * Returns whether the comparator can compare two values.
21 * @param mixed $expected The first value to compare
22 * @param mixed $actual The second value to compare
25 public function accepts($expected, $actual)
27 return $expected instanceof \Exception && $actual instanceof \Exception;
31 * Converts an object to an array containing all of its private, protected
32 * and public properties.
34 * @param object $object
37 protected function toArray($object)
39 $array = parent::toArray($object);
46 $array['xdebug_message']