fix indenting

This commit is contained in:
James 2019-09-22 08:43:19 +01:00
parent c47373ac99
commit 52f1363745
2 changed files with 20 additions and 20 deletions

View File

@ -3,22 +3,22 @@ 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'); $this->setHost('localhost');
$this->setPort(4444); $this->setPort(4444);
$this->setDesiredCapabilities(['moz:firefoxOptions'=>['args'=>['-headless','screenshot','window-size='.getenv('SeleniumWindowSize')]]]); $this->setDesiredCapabilities(['moz:firefoxOptions'=>['args'=>['-headless','screenshot','window-size='.getenv('SeleniumWindowSize')]]]);
$this->setBrowserUrl(getenv('SeleniumBrowserUrl')); $this->setBrowserUrl(getenv('SeleniumBrowserUrl'));
$this->setBrowser(getenv('SeleniumBrowser')); $this->setBrowser(getenv('SeleniumBrowser'));
} }
public function tearDown(){ public function tearDown(){
if ($this->hasFailed()) { if ($this->hasFailed()) {
if($path=getenv('SeleniumScreenshotPath')){ if($path=getenv('SeleniumScreenshotPath')){
$filedata = $this->currentScreenshot(); $filedata = $this->currentScreenshot();
file_put_contents($path.get_class($this).':'.$this->getName().'.png', $filedata); file_put_contents($path.get_class($this).':'.$this->getName().'.png', $filedata);
} }
}
$this->stop();
} }
$this->stop();
}
} }

View File

@ -5,11 +5,11 @@ use \PHPUnit\Framework\TestCase;
abstract class UrlRedirectTest extends TestCase{ abstract class UrlRedirectTest extends TestCase{
/** /**
* Test $from redirects to $to * Test $from redirects to $to
* @param string $from source URL * @param string $from source URL
* @param string $to dest URL * @param string $to dest URL
**/ **/
public function assertUrlRedirect($from,$to){ public function assertUrlRedirect($from,$to){
$ch = curl_init(); $ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $from); curl_setopt($ch, CURLOPT_URL, $from);