Releases: shulard/atoum-xml-extension
Releases · shulard/atoum-xml-extension
Move to Atoum 3.0.0
Atoum 3.0.0 has been released recently: http://atoum.org/release/2017/02/22/release-3-0-0.html
It's time to go stable 🎉.
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');
;
}
}
Publication on Packagist
A new step, this @atoum extension is now published on packagist has: shulard/atoum-xml-extension.
Feel free to install and use it using composer :
composer require --dev shulard/atoum-xml-extension