You are here

protected function SwaggerUiFieldFormatterTest::createScreenshot in Swagger UI Field Formatter 8.3

Creates a screenshot.

Parameters

string $filename: The file name of the resulting screenshot. If using the default phantomjs driver then this should be a JPG filename.

bool $set_background_color: (optional) By default this method will set the background color to white. Set to FALSE to override this behavior.

Throws

\Behat\Mink\Exception\UnsupportedDriverActionException When operation not supported by the driver.

\Behat\Mink\Exception\DriverException When the operation cannot be done.

Overrides WebDriverTestBase::createScreenshot

3 calls to SwaggerUiFieldFormatterTest::createScreenshot()
SwaggerUiFieldFormatterTest::testFileFormatter in tests/src/FunctionalJavascript/SwaggerUiFieldFormatterTest.php
Tests the file field formatter.
SwaggerUiFieldFormatterTest::testLinkFormatter in tests/src/FunctionalJavascript/SwaggerUiFieldFormatterTest.php
Tests the link field formatter.
SwaggerUiFieldFormatterTest::validateSwaggerUiErrorMessage in tests/src/FunctionalJavascript/SwaggerUiFieldFormatterTest.php
Tests Swagger UI library related field error message.

File

tests/src/FunctionalJavascript/SwaggerUiFieldFormatterTest.php, line 106

Class

SwaggerUiFieldFormatterTest
Tests file and link field formatters.

Namespace

Drupal\Tests\swagger_ui_formatter\FunctionalJavascript

Code

protected function createScreenshot($filename, $set_background_color = TRUE) : void {
  parent::createScreenshot(DRUPAL_ROOT . '/sites/simpletest/' . $filename . '.png', $set_background_color);
}