Annotation of embedaddon/php/ext/curl/tests/bug63795.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Bug #63795 (CURL >= 7.28.0 no longer support value 1 for CURLOPT_SSL_VERIFYHOST)
        !             3: --SKIPIF--
        !             4: <?php
        !             5: if (!extension_loaded("curl")) {
        !             6:         exit("skip curl extension not loaded");
        !             7: }
        !             8: $curl_version = curl_version();
        !             9: if ($curl_version['version_number'] < 0x071c01) {
        !            10:         exit("skip: test valid for libcurl >= 7.28.1");
        !            11: }
        !            12: ?>
        !            13: --FILE--
        !            14: <?php
        !            15: $ch = curl_init();
        !            16: var_dump(curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false));
        !            17: /* Case that should throw an error */
        !            18: var_dump(curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, true));
        !            19: var_dump(curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0));
        !            20: var_dump(curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1));
        !            21: var_dump(curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2));
        !            22: 
        !            23: curl_close($ch);
        !            24: ?>
        !            25: --EXPECTF--
        !            26: bool(true)
        !            27: 
        !            28: Notice: curl_setopt(): CURLOPT_SSL_VERIFYHOST no longer accepts the value 1, value 2 will be used instead in %s on line %d
        !            29: bool(true)
        !            30: bool(true)
        !            31: 
        !            32: Notice: curl_setopt(): CURLOPT_SSL_VERIFYHOST no longer accepts the value 1, value 2 will be used instead in %s on line %d
        !            33: bool(true)
        !            34: bool(true)

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>