fix indenting
This commit is contained in:
parent
c47373ac99
commit
52f1363745
@ -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();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user