protected function ThunderJavascriptTestBase::getScreenshotFolder in Thunder 8.3
Same name and namespace in other branches
- 8.5 tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderJavascriptTestBase::getScreenshotFolder()
- 8.2 tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderJavascriptTestBase::getScreenshotFolder()
- 8.4 tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderJavascriptTestBase::getScreenshotFolder()
- 6.2.x tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderJavascriptTestBase::getScreenshotFolder()
- 6.0.x tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderJavascriptTestBase::getScreenshotFolder()
- 6.1.x tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderJavascriptTestBase::getScreenshotFolder()
Get directory for saving of screenshots.
Directory will be created if it does not already exist.
Return value
string Return directory path to store screenshots.
Throws
\Exception
6 calls to ThunderJavascriptTestBase::getScreenshotFolder()
- ArticleCreationTest::testCreateArticle in tests/
src/ FunctionalJavascript/ ArticleCreationTest.php - Test Creation of Article.
- ChannelsTagsTest::testChannelsCreation in tests/
src/ FunctionalJavascript/ ChannelsTagsTest.php - Test channel creation, tagging of articles and channel page with articles.
- LiveblogTest::testWithPusher in tests/
src/ FunctionalJavascript/ Integration/ LiveblogTest.php - Testing of module integration.
- MediaGalleryModifyTest::testOrderChange in tests/
src/ FunctionalJavascript/ MediaGalleryModifyTest.php - Test order change for Gallery.
- MediaImageModifyTest::testFocalPointChange in tests/
src/ FunctionalJavascript/ MediaImageModifyTest.php - Test Focal Point change.
File
- tests/
src/ FunctionalJavascript/ ThunderJavascriptTestBase.php, line 144
Class
- ThunderJavascriptTestBase
- Base class for Thunder Javascript functional tests.
Namespace
Drupal\Tests\thunder\FunctionalJavascriptCode
protected function getScreenshotFolder() {
$dir = $this->screenshotDirectory;
// Use Travis Job ID for sub folder.
$travisId = getenv('TRAVIS_JOB_ID');
if (!empty($travisId)) {
$dir .= '/' . $travisId;
}
if (!is_dir($dir)) {
if (mkdir($dir, 0777, TRUE) === FALSE) {
throw new \Exception('Unable to create directory: ' . $dir);
}
}
return realpath($dir);
}