drevops / behat-steps

🧪 A collection of Behat step definitions for Drupal
GNU General Public License v3.0
18 stars 13 forks source link

FileTrait - support additional entity fields in fileCreateManaged #209

Closed ericgsmith closed 6 months ago

ericgsmith commented 6 months ago

When creating entities in tests we often need to set a UUID to a known value during the data setup.

This is supported for media when using the MediaTrait and also for nodes, terms and users from drupalextension packaged.

We have a use case where it would be beneficial to allow additional entity base field properties to be set when creating the file.

In our case we have some views that output UUID and some feeds that map on UUID, so in order to test them we want content setup with known UUIDs in order to prove the content is updated / matched correctly.

E.g:

    Given managed file:
      | uuid                                 | path             |
      | 9cb1b484-db7b-4496-bd63-8c702e207704 | example_text.txt |