By joachim on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
10.3.x
Introduced in version:
10.3.0
Issue links:
Description:
The trait \Drupal\Tests\image\Kernel\ImageFieldCreationTrait is used for easily creating image fields in PHPUnit tests which work with images.
It previously only allowed creation of image fields on the node entity type, but it can now do so on any entity type. An $entity_type parameter has been added to the createImageField() method.
Existing calls to createImageField() should add a parameter with value 'node':
Before:
$this->createImageField('field_image_field', 'article');
After:
$this->createImageField('field_image_field', 'node', 'article');
Impacts:
Module developers