[r396]: branches / 0.71 / t / Issues / rt70329.t  Maximize  Restore  History

Download this file

38 lines (31 with data), 810 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/perl
#
# Tests the error described in rt.cpan.org #70329
#
# The error came from handling multiref ids, and unconditionally
# overwriting the id attribute
#
#
use Test::More tests => 1;
use 5.006;
use strict;
use warnings;
use SOAP::Lite +trace => [ 'debug' ];
my $req1 = SOAP::Lite->new(
readable => 1,
autotype => 0,
proxy => 'LOOPBACK://',
);
# req1 does not generate the XML attribute <item id="0"> it just generates
# <item>
my $content = SOAP::Data->new(
name => 'item',
attr => { "id" => 1 },
value => \SOAP::Data->new(
name => 'foo',
value => 1,
),
);
my $response = $req1->requestMessage(\$content);
my $response_item = $response->dataof("//item");
is($content->attr->{ id }, $response_item->attr->{ id });

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks