LocalHostMultiTests

The Contact Form 7 - Infusionsoft Add-on LocalHostMultiTests class.

Defined (1)

The class is defined in the following location(s).

/src/xmlrpc-3.0/test/testsuite.php  
  1. class LocalHostMultiTests extends LocalhostTests 
  2. function _runtests() 
  3. global $failed_tests; 
  4. foreach(get_class_methods('LocalhostTests') as $meth) 
  5. if(strpos($meth, 'test') === 0 && $meth != 'testHttps' && $meth != 'testCatchExceptions') 
  6. if (!isset($failed_tests[$meth])) 
  7. $this->$meth(); 
  8. if ($this->_failed) 
  9. break; 
  10.  
  11. function testDeflate() 
  12. if(!function_exists('gzdeflate')) 
  13. $this->fail('Zlib missing: cannot test deflate functionality'); 
  14. return; 
  15. $this->client->accepted_compression = array('deflate'); 
  16. $this->client->request_compression = 'deflate'; 
  17. $this->_runtests(); 
  18.  
  19. function testGzip() 
  20. if(!function_exists('gzdeflate')) 
  21. $this->fail('Zlib missing: cannot test gzip functionality'); 
  22. return; 
  23. $this->client->accepted_compression = array('gzip'); 
  24. $this->client->request_compression = 'gzip'; 
  25. $this->_runtests(); 
  26.  
  27. function testKeepAlives() 
  28. if(!function_exists('curl_init')) 
  29. $this->fail('CURL missing: cannot test http 1.1'); 
  30. return; 
  31. $this->method = 'http11'; 
  32. $this->client->keepalive = true; 
  33. $this->_runtests(); 
  34.  
  35. function testProxy() 
  36. global $PROXYSERVER, $PROXYPORT; 
  37. if ($PROXYSERVER) 
  38. $this->client->setProxy($PROXYSERVER, $PROXYPORT); 
  39. $this->_runtests(); 
  40. else 
  41. $this->fail('PROXY definition missing: cannot test proxy'); 
  42.  
  43. function testHttp11() 
  44. if(!function_exists('curl_init')) 
  45. $this->fail('CURL missing: cannot test http 1.1'); 
  46. return; 
  47. $this->method = 'http11'; // not an error the double assignment! 
  48. $this->client->method = 'http11'; 
  49. //$this->client->verifyhost = 0; 
  50. //$this->client->verifypeer = 0; 
  51. $this->client->keepalive = false; 
  52. $this->_runtests(); 
  53.  
  54. function testHttp11Gzip() 
  55. if(!function_exists('curl_init')) 
  56. $this->fail('CURL missing: cannot test http 1.1'); 
  57. return; 
  58. $this->method = 'http11'; // not an error the double assignment! 
  59. $this->client->method = 'http11'; 
  60. $this->client->keepalive = false; 
  61. $this->client->accepted_compression = array('gzip'); 
  62. $this->client->request_compression = 'gzip'; 
  63. $this->_runtests(); 
  64.  
  65. function testHttp11Deflate() 
  66. if(!function_exists('curl_init')) 
  67. $this->fail('CURL missing: cannot test http 1.1'); 
  68. return; 
  69. $this->method = 'http11'; // not an error the double assignment! 
  70. $this->client->method = 'http11'; 
  71. $this->client->keepalive = false; 
  72. $this->client->accepted_compression = array('deflate'); 
  73. $this->client->request_compression = 'deflate'; 
  74. $this->_runtests(); 
  75.  
  76. function testHttp11Proxy() 
  77. global $PROXYSERVER, $PROXYPORT; 
  78. if(!function_exists('curl_init')) 
  79. $this->fail('CURL missing: cannot test http 1.1 w. proxy'); 
  80. return; 
  81. else if ($PROXYSERVER == '') 
  82. $this->fail('PROXY definition missing: cannot test proxy w. http 1.1'); 
  83. return; 
  84. $this->method = 'http11'; // not an error the double assignment! 
  85. $this->client->method = 'http11'; 
  86. $this->client->setProxy($PROXYSERVER, $PROXYPORT); 
  87. //$this->client->verifyhost = 0; 
  88. //$this->client->verifypeer = 0; 
  89. $this->client->keepalive = false; 
  90. $this->_runtests(); 
  91.  
  92. function testHttps() 
  93. global $HTTPSSERVER, $HTTPSURI; 
  94. if(!function_exists('curl_init')) 
  95. $this->fail('CURL missing: cannot test https functionality'); 
  96. return; 
  97. $this->client->server = $HTTPSSERVER; 
  98. $this->method = 'https'; 
  99. $this->client->method = 'https'; 
  100. $this->client->path = $HTTPSURI; 
  101. $this->_runtests(); 
  102.  
  103. function testHttpsProxy() 
  104. global $HTTPSSERVER, $HTTPSURI, $PROXYSERVER, $PROXYPORT;; 
  105. if(!function_exists('curl_init')) 
  106. $this->fail('CURL missing: cannot test https functionality'); 
  107. return; 
  108. else if ($PROXYSERVER == '') 
  109. $this->fail('PROXY definition missing: cannot test proxy w. http 1.1'); 
  110. return; 
  111. $this->client->server = $HTTPSSERVER; 
  112. $this->method = 'https'; 
  113. $this->client->method = 'https'; 
  114. $this->client->setProxy($PROXYSERVER, $PROXYPORT); 
  115. $this->client->path = $HTTPSURI; 
  116. $this->_runtests(); 
  117.  
  118. function testUTF8Responses() 
  119. global $URI; 
  120. //$this->client->path = strpos($URI, '?') === null ? $URI.'?RESPONSE_ENCODING=UTF-8' : $URI.'&RESPONSE_ENCODING=UTF-8'; 
  121. $this->client->path = $URI.'?RESPONSE_ENCODING=UTF-8'; 
  122. $this->_runtests(); 
  123.  
  124. function testUTF8Requests() 
  125. $this->client->request_charset_encoding = 'UTF-8'; 
  126. $this->_runtests(); 
  127.  
  128. function testISOResponses() 
  129. global $URI; 
  130. //$this->client->path = strpos($URI, '?') === null ? $URI.'?RESPONSE_ENCODING=UTF-8' : $URI.'&RESPONSE_ENCODING=UTF-8'; 
  131. $this->client->path = $URI.'?RESPONSE_ENCODING=ISO-8859-1'; 
  132. $this->_runtests(); 
  133.  
  134. function testISORequests() 
  135. $this->client->request_charset_encoding = 'ISO-8859-1'; 
  136. $this->_runtests();