ECK entities
DrevOps\BehatSteps\Steps\Drupal\EckTrait - Source, Example, Helpers
Manage Drupal ECK entities of an existing entity type and bundle.
- Create structured ECK entities with defined field values.
- Visit ECK entity pages and their edit pages.
- Created entities are automatically removed at the end of the scenario.
Prerequisites
| Prerequisite | Capability |
|---|---|
| A backend in the scenario's list provides "ContentCapabilityInterface" | ContentCapabilityInterface |
| The "eck" module from the "drupal/eck" package is enabled | ModuleCapabilityInterface |
Steps
@Given the following ECK :bundle :entity_type entities exist:
Create eck entities
Given the following ECK "contact" "contact_type" entities exist:
| title | field_marine_animal | field_fish_type | ... |
| Snook | Fish | Marine fish | 10 |
| ... | ... | ... | ... |
@Given the following ECK :bundle :entity_type entities do not exist:
Remove custom entities by field
Given the following ECK "contact" "contact_type" entities do not exist:
| title |
| Entity label |
@When I visit the ECK :bundle :entity_type entity page with the title :title
Visit the page of the eck entity with the specified type and title
When I visit the ECK "contact" "contact_type" entity page with the title "Test contact"
@When I visit the ECK :bundle :entity_type entity edit page with the title :title
Visit the edit page of the eck entity with the specified type and title
When I visit the ECK "contact" "contact_type" entity edit page with the title "Test contact"