X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=tests%2F4LocalhostMultiTest.php;h=8788ddcf69235de184e8467a7e8158262e9117b4;hb=c4596e5377f63464ebb1e60989f96ae82c81135a;hp=e5d365a0738bebbba73c1745ea55107535f78f47;hpb=b5246d02964ed3170b813e8595dd5d4051f681f4;p=plcapi.git diff --git a/tests/4LocalhostMultiTest.php b/tests/4LocalhostMultiTest.php index e5d365a..8788ddc 100644 --- a/tests/4LocalhostMultiTest.php +++ b/tests/4LocalhostMultiTest.php @@ -19,7 +19,10 @@ class LocalhostMultiTest extends LocalhostTest */ function _runtests() { - $unsafeMethods = array('testHttps', 'testCatchExceptions', 'testUtf8Method', 'testServerComments', 'testExoticCharsetsRequests', 'testExoticCharsetsRequests2', 'testExoticCharsetsRequests3'); + $unsafeMethods = array('testHttps', 'testCatchExceptions', 'testUtf8Method', 'testServerComments', 'testExoticCharsetsRequests', + 'testExoticCharsetsRequests2', 'testExoticCharsetsRequests3', + // @todo the following are currently not compatible w Digest Auth (most likely because of client copy) and should be fixed + 'testcatchWarnings', 'testWrappedMethodAsSource', 'testTransferOfObjectViaWrapping'); foreach(get_class_methods('LocalhostTest') as $method) { if(strpos($method, 'test') === 0 && !in_array($method, $unsafeMethods)) @@ -212,4 +215,25 @@ class LocalhostMultiTest extends LocalhostTest $this->client->request_charset_encoding = 'ISO-8859-1'; $this->_runtests(); } + + function testBasicAuth() + { + $this->client->setCredentials('test', 'test'); + $this->client->path = $this->args['URI'].'?FORCE_AUTH=Basic'; + $this->_runtests(); + } + + function testDigestAuth() + { + if (!function_exists('curl_init')) + { + $this->markTestSkipped('CURL missing: cannot test digest auth functionality'); + return; + } + $this->client->setCredentials('test', 'test', CURLAUTH_DIGEST); + $this->client->path = $this->args['URI'].'?FORCE_AUTH=Digest'; + $this->method = 'http11'; + $this->client->method = 'http11'; + $this->_runtests(); + } }