diff --git a/src/BrowserTest.php b/src/BrowserTest.php index 873cc9f..6c6d135 100644 --- a/src/BrowserTest.php +++ b/src/BrowserTest.php @@ -9,8 +9,14 @@ namespace JHodges\PHPUnitBase; abstract class BrowserTest extends \PHPUnit_Extensions_Selenium2TestCase{ public function setUp(){ - $this->setHost('localhost'); - $this->setPort(4444); + if(! $host=getenv('SeleniumHost')){ + $host='localhost'; + } + if(! $port=getenv('SeleniumPort')){ + $port='4444'; + } + $this->setHost($host); + $this->setPort($port); $args=explode(' ',getenv('SeleniumBrowserArgsVal')); $args[]='screenshot'; $this->setDesiredCapabilities([getenv('SeleniumBrowserArgsKey')=>['args'=>$args]]);