Test::XML::Element - Test the properties a single XML element in isolation.


Test-XML-Element documentation  | view source Contained in the Test-XML-Element distribution.

Index


NAME

Top

Test::XML::Element - Test the properties a single XML element in isolation.

VERSION

Top

0.01

SYNOPSIS

Top

    use Test::XML::Element tests => 4;
    element_is('<foobar />', "foobar")
    has_attribute('<foobar color="red" />', 'color');
    attribute_has_value('<foobar color="red">', color => 'red');

DESCRIPTION

Top

This module allows you to test the properties of a single XML element on it's own, which may be useful if your module does XML generation.

TESTS

Top

element_is $element, $name, [$message]

Test that an element is of the correct type.

has_attribute $element, $attribute, [$message]

Check that an element has a certain attribute

attribute_is $element, $attribute, $value, [$message]

Check that an attribute has a certain attribute, and it is set to a certain value.

AUTHOR

Top

Oliver Charles oliver.g.charles@googlemail.com

COPYRIGHT

Top


Test-XML-Element documentation  | view source Contained in the Test-XML-Element distribution.