[otrs-cvs] otrs/scripts/test XML.t,1.11,1.12
cvs-log at otrs.org
cvs-log at otrs.org
Mon Apr 2 14:36:21 GMT 2007
Comments:
Update of /home/cvs/otrs/scripts/test
In directory lancelot:/tmp/cvs-serv5075/scripts/test
Modified Files:
XML.t
Log Message:
Add tests for XMLHashMove().
Author: mh
Index: XML.t
===================================================================
RCS file: /home/cvs/otrs/scripts/test/XML.t,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** XML.t 2 Apr 2007 07:38:23 -0000 1.11
--- XML.t 2 Apr 2007 14:36:16 -0000 1.12
***************
*** 219,225 ****
);
foreach my $Key (@Keys) {
my $XMLHashDelete = $Self->{XMLObject}->XMLHashDelete(
! Type => 'SomeType',
Key => $Key,
);
--- 219,244 ----
);
+ @Keys = $Self->{XMLObject}->XMLHashList(
+ Type => 'SomeType',
+ );
+ foreach my $Key (@Keys) {
+ my $XMLHashMove = $Self->{XMLObject}->XMLHashMove(
+ OldType => 'SomeType',
+ OldKey => $Key,
+ NewType => 'SomeTypeNew',
+ NewKey => $Key,
+ );
+ $Self->True(
+ $XMLHashMove,
+ "XMLHashMove() (Key=$Key)",
+ );
+ }
+
+ @Keys = $Self->{XMLObject}->XMLHashList(
+ Type => 'SomeTypeNew',
+ );
foreach my $Key (@Keys) {
my $XMLHashDelete = $Self->{XMLObject}->XMLHashDelete(
! Type => 'SomeTypeNew',
Key => $Key,
);
***************
*** 254,259 ****
);
foreach my $Key (@Keys) {
my $XMLHashDelete = $Self->{XMLObject}->XMLHashDelete(
! Type => 'SomeType',
Key => $Key,
);
--- 273,294 ----
);
foreach my $Key (@Keys) {
+ my $XMLHashMove = $Self->{XMLObject}->XMLHashMove(
+ OldType => 'SomeType',
+ OldKey => $Key,
+ NewType => 'SomeTypeNew',
+ NewKey => $Key . 'New',
+ );
+ $Self->True(
+ $XMLHashMove,
+ "XMLHashMove() 2 (Key=$Key)",
+ );
+ }
+
+ @Keys = $Self->{XMLObject}->XMLHashList(
+ Type => 'SomeTypeNew',
+ );
+ foreach my $Key (@Keys) {
my $XMLHashDelete = $Self->{XMLObject}->XMLHashDelete(
! Type => 'SomeTypeNew',
Key => $Key,
);
More information about the cvs-log
mailing list