AFAIK Drupal Extension currently supports 3 main objects: users, terms and nodes.

Is it worth extending this to provide out of the box support for basic entities? Especially as Entity API is in core in D8.

Supporting something like "Given (a/an) :entity entity/entities/item/items with ..." would seem like an almost trivial cloning of the current code for handling nodes. In fact, it's so easy I wonder if I'm missing something and you've deliberately avoided it.

If this is thought to be desirable, I can probably get it done. My questions would be
1) Is this the only relevant step definition for basic entities?
2) Is the turnip syntax I'm suggesting - requiring the keyword "entity" or "item" - the best?
3) Am I correct that implementation would require
- a nakedEntityCreate and createNakedEntity corresponding to every nodeCreate and createNode that there is in the Drupal Driver (D7 & D8) and Drupal Extension;
- likewise for other "node" syntax like nodeDelete, beforeNodeCreate, etc.
- a step definition using the syntax above
- a feature to test this module is working right

Jonathan

Comments

jhedstrom’s picture

The approach outlined in the IS makes sense. In the Drupal Drivers, there would be new methods added. For the changes to the Drupal Extension, these could go into a dedicated EntityContext class so people could enable that as needed.

It's probably best to pursue this work over on github for the automated tests.

Thanks for pursuing this!

mpp’s picture