To manipulate the result Zend_Controller_Request_Http::isXmlHttpRequest()
maybe for testing XML Controllers in PHP Unit you just need to set the HTTP_X_REQUESTED_WITH value to XMLHttpRequest
Zend_Controller_Request_Http::isXmlHttpRequest() does nothing more than checking for this.
$_SERVER['HTTP_X_REQUESTED_WITH']="XMLHttpRequest";
Zend_Controller_Request_Http::isXmlHttpRequest() from Zend Framework Code
public function isXmlHttpRequest()
{
return ($this->getHeader('X_REQUESTED_WITH') == 'XMLHttpRequest');
}
public
function getHeader
($header){........
$temp =
'HTTP_' .
strtoupper(str_replace('-',
'_',
$header));
if (!
empty($_SERVER[$temp])) { return $_SERVER[$temp];
}