diff --git a/src/BrowserTest.php b/src/BrowserTest.php index e5dcd1d..11f059d 100644 --- a/src/BrowserTest.php +++ b/src/BrowserTest.php @@ -3,22 +3,22 @@ namespace JHodges\PHPUnitBase; 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')]]]); - $this->setBrowserUrl(getenv('SeleniumBrowserUrl')); - $this->setBrowser(getenv('SeleniumBrowser')); - } + public function setUp(){ + $this->setHost('localhost'); + $this->setPort(4444); + $this->setDesiredCapabilities(['moz:firefoxOptions'=>['args'=>['-headless','screenshot','window-size='.getenv('SeleniumWindowSize')]]]); + $this->setBrowserUrl(getenv('SeleniumBrowserUrl')); + $this->setBrowser(getenv('SeleniumBrowser')); + } - public function tearDown(){ - if ($this->hasFailed()) { - if($path=getenv('SeleniumScreenshotPath')){ - $filedata = $this->currentScreenshot(); - file_put_contents($path.get_class($this).':'.$this->getName().'.png', $filedata); - } - } - $this->stop(); + public function tearDown(){ + if ($this->hasFailed()) { + if($path=getenv('SeleniumScreenshotPath')){ + $filedata = $this->currentScreenshot(); + file_put_contents($path.get_class($this).':'.$this->getName().'.png', $filedata); + } } + $this->stop(); + } } diff --git a/src/UrlRedirectTest.php b/src/UrlRedirectTest.php index 28ab5e4..037f08b 100644 --- a/src/UrlRedirectTest.php +++ b/src/UrlRedirectTest.php @@ -5,11 +5,11 @@ use \PHPUnit\Framework\TestCase; abstract class UrlRedirectTest extends TestCase{ - /** - * Test $from redirects to $to - * @param string $from source URL - * @param string $to dest URL - **/ + /** + * Test $from redirects to $to + * @param string $from source URL + * @param string $to dest URL + **/ public function assertUrlRedirect($from,$to){ $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $from);