public function SocialMinkContext::iMakeAScreenshotWithFileName in Open Social 8.5
Same name and namespace in other branches
- 8.9 tests/behat/features/bootstrap/SocialMinkContext.php \Drupal\social\Behat\SocialMinkContext::iMakeAScreenshotWithFileName()
- 8.3 tests/behat/features/bootstrap/SocialMinkContext.php \Drupal\social\Behat\SocialMinkContext::iMakeAScreenshotWithFileName()
- 8.4 tests/behat/features/bootstrap/SocialMinkContext.php \Drupal\social\Behat\SocialMinkContext::iMakeAScreenshotWithFileName()
- 8.6 tests/behat/features/bootstrap/SocialMinkContext.php \Drupal\social\Behat\SocialMinkContext::iMakeAScreenshotWithFileName()
- 8.7 tests/behat/features/bootstrap/SocialMinkContext.php \Drupal\social\Behat\SocialMinkContext::iMakeAScreenshotWithFileName()
- 8.8 tests/behat/features/bootstrap/SocialMinkContext.php \Drupal\social\Behat\SocialMinkContext::iMakeAScreenshotWithFileName()
- 10.3.x tests/behat/features/bootstrap/SocialMinkContext.php \Drupal\social\Behat\SocialMinkContext::iMakeAScreenshotWithFileName()
- 10.0.x tests/behat/features/bootstrap/SocialMinkContext.php \Drupal\social\Behat\SocialMinkContext::iMakeAScreenshotWithFileName()
- 10.1.x tests/behat/features/bootstrap/SocialMinkContext.php \Drupal\social\Behat\SocialMinkContext::iMakeAScreenshotWithFileName()
- 10.2.x tests/behat/features/bootstrap/SocialMinkContext.php \Drupal\social\Behat\SocialMinkContext::iMakeAScreenshotWithFileName()
@Given /^I make a screenshot with the name "([^"]*)"$/
2 calls to SocialMinkContext::iMakeAScreenshotWithFileName()
- SocialMinkContext::iMakeAScreenshot in tests/
behat/ features/ bootstrap/ SocialMinkContext.php - @Given /^I make a screenshot$/
- SocialMinkContext::takeScreenShotAfterFailedStep in tests/
behat/ features/ bootstrap/ SocialMinkContext.php - @AfterStep
File
- tests/
behat/ features/ bootstrap/ SocialMinkContext.php, line 72
Class
- SocialMinkContext
- Defines application features from the specific context.
Namespace
Drupal\social\BehatCode
public function iMakeAScreenshotWithFileName($filename) {
$screenshot = $this
->getSession()
->getDriver()
->getScreenshot();
$dir = '/var/www/travis_artifacts';
if (is_writeable($dir)) {
$file_and_path = $dir . '/' . $filename . '.jpg';
file_put_contents($file_and_path, $screenshot);
}
}