function testXHR() { $req = new Request(); $req->mock(array("HTTP_X_REQUESTED_WITH" => "XMLHttpRequest")); $this->assertTrue($req->isAjax()); }