PHPTD - Testing XML
Posted: Fri Jan 26, 2007 2:56 pm
The PHP Developer Network - PHP Throw Down team are planning on using XSLT pretty extensively. We are also using ZF too so there'll be code like this:
My question is exactly how am I going to test the business logic here?
We seriously won't need to test the XSLT but everything up until that function call (xsltTransform()) will need to be tested. But how?
Code: Select all
class SomeController extends Zend_Controller_Action
{
public function indexAction()
{
$xml = /* generate bunch of xml dependent on business logic*/;
echo xsltTransform($xml, 'xsltfilename');
}
}We seriously won't need to test the XSLT but everything up until that function call (xsltTransform()) will need to be tested. But how?