I am using Drupal 8 CMS for a media platform, which essentially uses twig templating engine. We are using component based approach, building small re-usbale building blocks instead of building the complete page.
Now each component has its twig file and stylesheet for css rules.
My question is can these what testing strategy suits better for automating testing strategy for the twig templates?
Looks like phpunit has a way to test twig templates in isolation https://stackoverflow.com/questions/17026405/twig-template-unit-testing
But to me it appears to be overkill to have unit testing for templating engine, since twig templates are not meant to have complex business logic but yes it could be simple if else conditional branching on template.
Functional Test seems to be better candidate for this sort of assertions, but yes functional tests are slow since they are opinionated about database connections unlike unit tests.
Let me emphasis on my question again for a media platform using Drupal 8 as CMS what testing strategy suits better to test frontend twig templates? Is it