X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=tests%2F4LocalhostMultiTest.php;h=0516c3044c74fe18691d263ed91f55da635054f3;hb=7c04cb0468d6b7a268a18e1ca33bf0e30cd87fa0;hp=f4c5b177f10b0087dfef91432a1cd381296261cb;hpb=9075d498d49e21aae4632034b3e96b1568bba70f;p=plcapi.git diff --git a/tests/4LocalhostMultiTest.php b/tests/4LocalhostMultiTest.php index f4c5b17..0516c30 100644 --- a/tests/4LocalhostMultiTest.php +++ b/tests/4LocalhostMultiTest.php @@ -22,7 +22,7 @@ class LocalhostMultiTest extends LocalhostTest public function getSingleHttpTestMethods() { $unsafeMethods = array( - 'testHttps', 'testCatchExceptions', 'testUtf8Method', 'testServerComments', + 'testCatchExceptions', 'testUtf8Method', 'testServerComments', 'testExoticCharsetsRequests', 'testExoticCharsetsRequests2', 'testExoticCharsetsRequests3', ); @@ -131,6 +131,26 @@ class LocalhostMultiTest extends LocalhostTest $this->$method(); } + /** + * @dataProvider getSingleHttpTestMethods + * @param string $method + */ + public function testHttp10Curl($method) + { + if(!function_exists('curl_init')) + { + $this->markTestSkipped('CURL missing: cannot test http 1.1'); + return; + } + + $this->method = 'http10'; // not an error the double assignment! + $this->client->method = 'http10'; + $this->client->keepalive = false; + $this->client->setUseCurl(\PhpXmlRpc\Client::USE_CURL_ALWAYS); + + $this->$method(); + } + /** * @dataProvider getSingleHttpTestMethods * @param string $method @@ -224,6 +244,30 @@ class LocalhostMultiTest extends LocalhostTest $this->$method(); } + /** + * @dataProvider getSingleHttpTestMethods + * @param string $method + */ + public function testHttpsSocket($method) + { + if ($this->args['HTTPSSERVER'] == '') + { + $this->markTestSkipped('HTTPS SERVER definition missing: cannot test https'); + return; + } + + $this->client->server = $this->args['HTTPSSERVER']; + $this->method = 'https'; + $this->client->method = 'https'; + $this->client->path = $this->args['HTTPSURI']; + $this->client->setSSLVerifyPeer(!$this->args['HTTPSIGNOREPEER']); + $this->client->setSSLVerifyHost($this->args['HTTPSVERIFYHOST']); + $this->client->setSSLVersion($this->args['SSLVERSION']); + $this->client->setUseCurl(\PhpXmlRpc\Client::USE_CURL_NEVER); + + $this->$method(); + } + /** * @dataProvider getSingleHttpTestMethods * @param string $method