Create Tests for Themes?

Will there be an ability to create tests for themes? More specifically, theme template files including the twig inside it?

My use case for this would be to ensure things work correctly for all aspects of the file.

There is a Dusk plugin you can use to perform browser-based tests:

These are pretty useful but can be expensive to write, so its best to consider for established work.

1 Like

Not sure if it’s what you’re looking for but we wrote unit tests with something similar for SEO Storm plugin here:

See the phpunit.xml and testing theme to see what’s going on.

Best regards,

Tomasz Strojny

1 Like