I get this error when I run phpunit with selenium.
When I check the class PHPUnit_Framework_ExpectationFailedException, I found the following line :
public function __construct($message, PHPUnit_Framework_ComparisonFailure $comparisonFailure = NULL)
Indeed, the second parameter has to be an object and not a string but if I check the class SeleniumTestCase, I can see :
if ($e instanceof PHPUnit_Framework_ExpectationFailedException) {
if (is_object($e->getComparisonFailure())) {
$message = $e->getComparisonFailure()->toString();
} else {
$message = $e->getMessage();
}
$buffer .= "\n" . $message;
throw new PHPUnit_Framework_ExpectationFailedException($buffer, $message);
The $message seems to be a string and not an object.
Can you help me ?
PS: I am using the version of phpunit (3.6.4) and the last version of selenium (1.1.1)