phpunit has removed that class in
https://github.com/sebastianbergmann/phpunit/commit/
f0322b6978bc2b6fd9a17f499950a4b023ef3db4
instead adding a dependency on "sebastian/comparator": "dev-master"
https://github.com/sebastianbergmann/comparator
The class name changed from PHPUnit_Framework_ComparisonFailure
to \SebastianBergmann\Comparator\ComparisonFailure\ComparisonFailure
Bug: T90880
Change-Id: I8988d0b07c00f54c8c8dd38a5e92a5736d88b163
if ( is_array( $message ) ) {
$message = http_build_query( $message );
}
+
+ // FIXME: once we migrate to phpunit 4.1+, hardcode ComparisonFailure exception use
+ $compEx = 'SebastianBergmann\Comparator\ComparisonFailure';
+ if ( !class_exists( $compEx ) ) {
+ $compEx = 'PHPUnit_Framework_ComparisonFailure';
+ }
+
throw new PHPUnit_Framework_ExpectationFailedException(
$e->getMessage() . "\nRequest: $message",
- new PHPUnit_Framework_ComparisonFailure(
+ new $compEx(
$exp,
$result,
print_r( $exp, true ),