You are here

protected function WebformElementTextFormatTest::reloadImages in Webform 6.x

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

Reload images.

Parameters

array $images: An array of image files.

1 call to WebformElementTextFormatTest::reloadImages()
WebformElementTextFormatTest::testTextFormatFiles in tests/src/Functional/Element/WebformElementTextFormatTest.php
Tests webform text format element files.

File

tests/src/Functional/Element/WebformElementTextFormatTest.php, line 187

Class

WebformElementTextFormatTest
Tests for text format element.

Namespace

Drupal\Tests\webform\Functional\Element

Code

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