fix take screenshot for all results but success

This commit is contained in:
James 2020-02-10 18:03:33 +00:00
parent ffccf63792
commit e03444314b

View File

@ -19,7 +19,7 @@ abstract class BrowserTest extends \PHPUnit_Extensions_Selenium2TestCase{
}
public function tearDown(){
if ($this->hasFailed()) {
if ($this->getStatus()!==0) {
if($path=getenv('SeleniumScreenshotPath')){
$filedata = $this->currentScreenshot();
file_put_contents($path.get_class($this).'::'.$this->getName().'.png', $filedata);