Skip to content

Releases: shulard/atoum-xml-extension

Move to Atoum 3.0.0

27 Feb 14:06
Compare
Choose a tag to compare

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 !

27 Feb 13:58
Compare
Choose a tag to compare

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

31 Oct 11:39
Compare
Choose a tag to compare

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