Issue Summary
The test coverage for theme output across core is patchy, and in some places not well implemented.
Tests that compare one string of HTML output to another are fragile, and failures are not necessarily representitive of a failure to the user (prehaps because an elements attributes are in a different order. It would be better to use superior analysis tools such as CSS Selectors or XPath/SimpleXml to perform assertions with rendered output.