Add HTML assertion support !
Now you can use the new html
handler to perform document validation on each HTML document.
Use it
<?php
namespace shulard\example\xml;
use atoum;
class foo extends atoum\test
{
public function testOnHtmlDocument()
{
$this
->then
->html(file_get_contents('http://example.com'))
->isValidAgainstSchema
->dtd('http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd', 'html')
->parent
->xpath('//title')
->item(0)
->nodevalue
->isEqualTo('My awesome title')
->xpath('//body/script')
->last()
->nodevalue
->contains('GMTXXXXXX');
;
}
}