I run a project test suite where I check if the html markup against its declared DTD:
$browser->with('response')->isValid(true);
Currently I have:
RuntimeException: PHP sent a "warning" error at /blablablah/lib/vendor/symfony/lib/test/sfTesterResponse.class.php line 181 (DOMDocument::loadXML(http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd): failed to open stream: HTTP request failed! HTTP/1.1 503 Service Unavailable
Okay, it can be a temporary problem, but anyway, I think:
- it's hardly acceptable because a lot of integration servers are not accepting outgoing HTTP connections, so it will fail everytime the test is ran,
- so it's not a valid test result failure reason
What I suggest is to bundle W3C DTD documents within symfony and load them to validate markup using a call to the filesystem.