sebastianbergmann/phpunit-selenium — Issue #101: exceptions from data providers are not caught
Author: psemuu
Created: 2012-02-27 08:42:28+00:00
State: open

In PHPUnit_Extension_SeleniumTestCase::suite every use of PHPUnit_Util_Test::getProvidedData should be wrapped in a try/catch block because exceptions can be thrown from there:
- when the data set is invalid,
- when the provider method throws an exception.
PHPUnit_Framework_TestSuite::createTest has the try/catch block.

Additionally, while iterating over the data in the PHPUnit_Framework_TestSuite::createTest method, some things are done that are missing from PHPUnit_Extension_SeleniumTestCase::suite (running the test in a separate process and backup settings).

I've rewritten the suite method but am not sure what to do with the other differences mentioned above. What do you think should be done about it? I can push my changes if necessary.