Cant get PHPUnit and selenium working correctly

Fix for the PHPUnit issue https://github.com/sebastianbergmann/phpunit/issues/631 causing this problem were merged into PHPUnit’s master branch (see: https://github.com/sebastianbergmann/phpunit/pull/636 ). So, waiting for next release of PHPUnit or using development version. (:

I had a simular problem and it seamed to be fixed when I added the line below at the top of my SeleniumTestCase.php

require_once(‘SeleniumTestCase/Driver.php’);

I am using Windows xampp and had that file located: C:\xampp\php\PEAR\PHPUnit\Extensions

Hope it helps someone else.

Now I only have one problem left and that is that when I get a failing test I get

Fatal error: Call to undefined method PHPUnit_Framework_ExpectationFailedExpectation::getCustomMessage() in C:\xampp\php\PEAR\PHPUnit\Extensions\SeleniumTestCase.php

But on successful test I get it to pass. Anyone got any idea how I can fix so that I can see what failed?

I’ve got the same problems and now can fixed with your advices. Thanks.

I did the installation using composer from my project root directory.

Here’s the contents of my composer.json

{

"require-dev": {


    "phpunit/phpunit": "3.7.*",


	"phpunit/phpunit-selenium": ">=1.2",


	"phpunit/php-invoker": "*"


}

}

Then I ran php composer.phar update from project root dir

Neil