Permalink
Browse files

- Avoid fatal error in case Testing_Selenium is not installed.

  • Loading branch information...
sebastianbergmann committed Dec 27, 2006
1 parent 9c2e0cc commit 7e387645ba2ccc8fc77586bceee2757e5b12a507
Showing with 5 additions and 1 deletion.
  1. +5 −1 PHPUnit/Extensions/SeleniumTestCase.php
@@ -46,7 +46,7 @@
require_once 'PHPUnit/Framework.php';
require_once 'PHPUnit/Util/Filter.php';
-require_once 'Testing/Selenium.php';
+@include_once 'Testing/Selenium.php';
PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
@@ -112,6 +112,10 @@ protected function runTest()
$driver = 'native';
}
+ if (!class_exists('Testing_Selenium')) {
+ throw new RuntimeException('The Testing_Selenium package is not installed.');
+ }
+
$this->selenium = new Testing_Selenium(
$this->browser,
$this->browserUrl,

0 comments on commit 7e38764

Please sign in to comment.