1

I have an administrative View that has a couple access checks based on current user. I would like to add an automated test to the view.

Since I only need to check the result count (no specific field) based on whats set in a users profile, how can I test this view?

Fields I will normally scaffold in setUp() using FieldConfig class, is there a similar one for Views?

These run in CI (I don't know how DTT works in this regard) and the View is apt to change, copying a YAML file into a module can often be forgot (and carry many dependencies with it).

1 Answer 1

0

I wound up using Drupal Test Traits.

The only thing left for me to do is obtain a copy of the database to run the tests in CI, which I can use Drush to grab.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.