1
votes

I'd current use Symfony2 with Twig. I'm working on configuring our continuous integration (CI) project right now for it.

I was wondering a couple things related to Twig: - Are there any tests for testing Twig (unit testing, block testing, code standards, etc) - Is there a way to test the HTML which it generates (is it possible to generate a cache we can examine using specific parameters)?

Additionally, does anyone know any good tools to use to test HTML in some way from command-line. My primary concern is to make sure we are following a specific standard (standards-compliant polyglot, HTML5+XML essentially). Other tests would be cool as well.

I suspect there probably isn't anything Twig specific, but I figured it couldn't hurt to ask.

I'm also guessing I could mix in HTML testing with my regular unit tests by testing the response results, but I was wondering if there was anything cleaner (so I can separate HTML tests into it's own things, and that also makes standards-compliance tricky).

Thanks.

(I'm using TeamCity on Linux)

1

1 Answers

2
votes

Use Behat, Mink and the Symfony extension for Behat.

This is great stuff that will allow you to conduct your functional tests with many different drivers