From f9cb9aac4ca6b9c25750fa36d016b62589838006 Mon Sep 17 00:00:00 2001 From: James Date: Sun, 22 Sep 2019 08:55:21 +0100 Subject: [PATCH] get browser args fropm config --- phpunit.xml | 15 +++++++++++---- src/BrowserTest.php | 4 +++- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/phpunit.xml b/phpunit.xml index 70113e8..725880c 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,13 +1,13 @@ - @@ -16,8 +16,15 @@ + + + + ./tests/ + + + diff --git a/src/BrowserTest.php b/src/BrowserTest.php index 11f059d..8761062 100644 --- a/src/BrowserTest.php +++ b/src/BrowserTest.php @@ -6,7 +6,9 @@ abstract class BrowserTest extends \PHPUnit_Extensions_Selenium2TestCase{ public function setUp(){ $this->setHost('localhost'); $this->setPort(4444); - $this->setDesiredCapabilities(['moz:firefoxOptions'=>['args'=>['-headless','screenshot','window-size='.getenv('SeleniumWindowSize')]]]); + $args=explode(',',getenv('SeleniumBrowserArgs')); + $args[]='screenshot'; + $this->setDesiredCapabilities(['moz:firefoxOptions'=>['args'=>$args]]); $this->setBrowserUrl(getenv('SeleniumBrowserUrl')); $this->setBrowser(getenv('SeleniumBrowser')); }