allow selenium host/port to be specified in env
This commit is contained in:
parent
7d3fb69463
commit
374ddd1560
@ -9,8 +9,14 @@ namespace JHodges\PHPUnitBase;
|
|||||||
abstract class BrowserTest extends \PHPUnit_Extensions_Selenium2TestCase{
|
abstract class BrowserTest extends \PHPUnit_Extensions_Selenium2TestCase{
|
||||||
|
|
||||||
public function setUp(){
|
public function setUp(){
|
||||||
$this->setHost('localhost');
|
if(! $host=getenv('SeleniumHost')){
|
||||||
$this->setPort(4444);
|
$host='localhost';
|
||||||
|
}
|
||||||
|
if(! $port=getenv('SeleniumPort')){
|
||||||
|
$port='4444';
|
||||||
|
}
|
||||||
|
$this->setHost($host);
|
||||||
|
$this->setPort($port);
|
||||||
$args=explode(' ',getenv('SeleniumBrowserArgsVal'));
|
$args=explode(' ',getenv('SeleniumBrowserArgsVal'));
|
||||||
$args[]='screenshot';
|
$args[]='screenshot';
|
||||||
$this->setDesiredCapabilities([getenv('SeleniumBrowserArgsKey')=>['args'=>$args]]);
|
$this->setDesiredCapabilities([getenv('SeleniumBrowserArgsKey')=>['args'=>$args]]);
|
||||||
|
Loading…
Reference in New Issue
Block a user