diff -u b/core/tests/Drupal/FunctionalJavascriptTests/JavascriptTestBase.php b/core/tests/Drupal/FunctionalJavascriptTests/JavascriptTestBase.php --- b/core/tests/Drupal/FunctionalJavascriptTests/JavascriptTestBase.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/JavascriptTestBase.php @@ -108,16 +108,18 @@ * @param string $filename * The file name of the resulting screenshot. If using the default phantomjs * driver then this should be a JPG filename. + * @param string $background_color + * (optional) Background color name. * * @throws \Behat\Mink\Exception\UnsupportedDriverActionException * When operation not supported by the driver. * @throws \Behat\Mink\Exception\DriverException * When the operation cannot be done. */ - protected function createScreenshot($filename, $background = 'white') { + protected function createScreenshot($filename, $background_color = 'white') { $session = $this->getSession(); if (!empty($background)) { - $session->executeScript("document.body.style.backgroundColor = '" . $background . "';"); + $session->executeScript("document.body.style.backgroundColor = '" . $background_color . "';"); } $image = $session->getScreenshot(); file_put_contents($filename, $image);