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);