1 |
#!/usr/bin/perl |
#!/usr/bin/perl |
2 |
use strict; |
use strict; |
3 |
use Test; |
use Test; |
4 |
BEGIN { plan tests => 52 } |
BEGIN { plan tests => 55 } |
5 |
|
|
6 |
require Message::DOM::DOMImplementation; |
require Message::DOM::DOMImplementation; |
7 |
use Message::Util::Error; |
use Message::Util::Error; |
126 |
"$method get_attribute_ns [3]"; |
"$method get_attribute_ns [3]"; |
127 |
} |
} |
128 |
|
|
129 |
|
## |attributes| |
130 |
|
{ |
131 |
|
my $el = $doc->create_element ('e'); |
132 |
|
ok $el->can ('attributes') ? 1 : 0, 1, 'Element->attributes can'; |
133 |
|
|
134 |
|
my $as = $el->attributes; |
135 |
|
ok UNIVERSAL::isa ($as, 'Message::IF::NamedNodeMap') ? 1 : 0, 1, 'E->as if'; |
136 |
|
|
137 |
|
$el->set_attribute (at1 => 'value'); |
138 |
|
ok $as->get_named_item ('at1'), $el->get_attribute_node ('at1'), |
139 |
|
'Element->attributes get_named_item get_attr_node'; |
140 |
|
} |
141 |
|
|
142 |
=head1 LICENSE |
=head1 LICENSE |
143 |
|
|
144 |
Copyright 2007 Wakaba <w@suika.fam.cx> |
Copyright 2007 Wakaba <w@suika.fam.cx> |