ePages 6.10 - DE_EPAGES/Object/API/TestXML.pm

Package DE_EPAGES::Object::API::TestXML

Unit test for XML export and import

@EXPORT_OK
SixTestsXML

Functions

SixTestsXML

SixTestsXML

This function tests the XML import handler, export driver and delete handler for a certain class of objects. It performs the following 6 operations:

  1. Init - delete the object /Test if it still exists and then creates the object again
  2. Import - import the objects from the file import.xml
  3. Export - exports the child objects of /Test with the alias names objects given in $aObjectAliases to the file export.xml using the encoding iso-8859-1
  4. Diff - compares the files import.xml and export.xml igoring whitespaces and differences in the attributes GUID, Position and 'delete'.
  5. Delete - deletes the objects that are marked with 'delete="1"' in the import.xml file and chacks that all children of /Test with alis names in $aObjectAliases are gone.
  6. Cleanup - deletes the /Test object and the export.xml file
Note: all objects that are createed during the test should be children or gand children of /Test

Syntax
SixTestsXML( $aObjectAliases );
Example
SixTestsXML( [ 'TestObject' ] );
Input
$aObjectAliases (ref.array.string)
list of object aliases