This may be a dumb question, but do you make unit tests for the HTML output of your PHP functions/scripts?
I try to keep my HTML and my PHP separate - i.e. HTML includes with placeholders, and functions for certain recurring elements (tabular data / any sort of looped output) - but I'm not sure how to go about verifying this.
Is there a standard way to go about such things, or is it mainly a matter of using regular unit tests on functions which create the inserted content, and then making sure it looks correct in the browser/W3C Validator?
Thanks.
Edit: I guess a corollary to this would be: are these sorts of unit tests even worth having? If you're keeping your content and structure properly separated, then you would really only be testing a handful of includes in very limited scenarios (presumably, anyway). Is it really worth it to semi-hand-craft full pages just to have a file to compare to?