Returns whether the comparator can compare two values.
@since Method available since Release 3.6.0
mixed $expected The first value to compare:
mixed $actual The second value to compare:
boolean
Overrides PHPUnit_Framework_Comparator::accepts
public function accepts($expected, $actual) {
return (is_scalar($expected) xor NULL === $expected) && (is_scalar($actual) xor NULL === $actual) || is_string($expected) && is_object($actual) && method_exists($actual, '__toString') || is_object($expected) && method_exists($expected, '__toString') && is_string($actual);
}