Jump to content

help with unit testing


mpsn

Recommended Posts

Hi, I have a class XMLtool where one of the functions is to output a parameter-passed dom document and then output to the browser screen, so basically:

 

function outputXML($domDocument) {

  if has attributes

    print cur nodes attributes

  for each child,

      if child is element node

          outputXML(cur node)

      else if child is text

          print text

  end for each

}

 

Please I am not sure what type of unit tests I can perform. I'd appreciate all the help!

Link to comment
https://forums.phpfreaks.com/topic/251518-help-with-unit-testing/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.