You are here

protected function WebformEditorTest::reloadImages in Webform 6.x

Same name and namespace in other branches
  1. 8.5 tests/src/Functional/WebformEditorTest.php \Drupal\Tests\webform\Functional\WebformEditorTest::reloadImages()

Reload images.

Parameters

array $images: An array of image files.

2 calls to WebformEditorTest::reloadImages()
WebformEditorTest::testWebformConfigurationFiles in tests/src/Functional/WebformEditorTest.php
Tests webform configuration files.
WebformEditorTest::testWebformSettingsFiles in tests/src/Functional/WebformEditorTest.php
Tests webform entity settings files.

File

tests/src/Functional/WebformEditorTest.php, line 267

Class

WebformEditorTest
Tests for webform editor.

Namespace

Drupal\Tests\webform\Functional

Code

protected function reloadImages(array &$images) {
  \Drupal::entityTypeManager()
    ->getStorage('file')
    ->resetCache();
  foreach ($images as $index => $image) {
    $images[$index] = File::load($image
      ->id());
  }
}