From e03444314b22fe3d21a4b4f1607d4c3189404bf6 Mon Sep 17 00:00:00 2001 From: James Date: Mon, 10 Feb 2020 18:03:33 +0000 Subject: [PATCH] fix take screenshot for all results but success --- src/BrowserTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BrowserTest.php b/src/BrowserTest.php index 277f95e..5beaa2d 100644 --- a/src/BrowserTest.php +++ b/src/BrowserTest.php @@ -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);