Noticed that the workflow group declared in state_test module says:

order:
  label: Order
  entity_type: commerce_order

That entity type is not created by this module. Would be better not to rely on entities provided by other module. See modules/state_machine/tests/modules/state_machine_test/state_machine_test.workflow_groups.yml

CommentFileSizeAuthor
#3 state_test_module-2774939-3.patch6.56 KBmglaman
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

moshe weitzman created an issue. See original summary.

moshe weitzman’s picture

Title: state_test module depends on » state_test module depends on commerce_order

Also, \Drupal\state_machine_test\Guard\FulfillmentGuard depends on external stuff as well. I'm using the test module as a quick UI learning tool. Maybe this module can grow into that.

mglaman’s picture

Status: Active » Needs review
FileSize
6.56 KB

Here is a patch which moves the test group to entity_test, removing dependency on commerce_order.

bojanz’s picture

@moshe weitzman
The reason why the test module uses commerce_order is because I wanted it to provide a concrete example, precisely for learning purposes.
Look at #3, where Matt replaced commerce_order with entity_test, did we gain any clarity? Or did we lose it? I am not sure.

moshe weitzman’s picture

I agree that a concrete use case clarifies things. If its possible to get more concrete, then lets do that. if nobody has time to work on this more, I think it is a step forward.

  • bojanz committed e6942a2 on 8.x-1.x authored by mglaman
    Issue #2774939 by mglaman: state_test module depends on commerce_order
    
bojanz’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.