jhedstrom / DrupalDriver

A collection of drivers for controlling Drupal.
GNU General Public License v2.0
64 stars 97 forks source link

Add support for `og_standard_reference` field type of 'Organic Groups' contrib module #237

Open BaluErtl opened 3 years ago

BaluErtl commented 3 years ago

We needed it in a client project to be able to build a hierarchical content structure in runtime. With this extra class in the namespace now Behat/Mink finds the correct handler to populate Organic Groups' entity reference field too. For example:

Given organization content:
  | title                 | status | og_audience           | author |
  | Top-level published   | 1      |                       | owner  |
  | Mid-level published   | 1      | Top-level published   | owner  |
  | Low-level published   | 1      | Mid-level published   | owner  |
  | Top-level unpublished | 0      |                       | owner  |
  | Mid-level unpublished | 0      | Top-level unpublished | owner  |
  | Low-level unpublished | 0      | Mid-level unpublished | owner  |