Annotation of embedaddon/php/ext/standard/tests/url/urldecode_error_001.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Test urldecode() function : error conditions 
        !             3: --FILE--
        !             4: <?php
        !             5: /* Prototype  : proto string urldecode(string str)
        !             6:  * Description: Decodes URL-encoded string 
        !             7:  * Source code: ext/standard/url.c
        !             8:  * Alias to functions: 
        !             9:  */
        !            10: 
        !            11: // NB: basic functionality tested in tests/strings/001.phpt
        !            12: 
        !            13: echo "*** Testing urldecode() : error conditions ***\n";
        !            14: 
        !            15: // Zero arguments
        !            16: echo "\n-- Testing urldecode() function with Zero arguments --\n";
        !            17: var_dump( urldecode() );
        !            18: 
        !            19: //Test urldecode with one more than the expected number of arguments
        !            20: echo "\n-- Testing urldecode() function with more than expected no. of arguments --\n";
        !            21: $str = 'string_val';
        !            22: $extra_arg = 10;
        !            23: var_dump( urldecode($str, $extra_arg) );
        !            24: 
        !            25: echo "Done";
        !            26: ?>
        !            27: --EXPECTF--
        !            28: *** Testing urldecode() : error conditions ***
        !            29: 
        !            30: -- Testing urldecode() function with Zero arguments --
        !            31: 
        !            32: Warning: urldecode() expects exactly 1 parameter, 0 given in %s on line 14
        !            33: NULL
        !            34: 
        !            35: -- Testing urldecode() function with more than expected no. of arguments --
        !            36: 
        !            37: Warning: urldecode() expects exactly 1 parameter, 2 given in %s on line 20
        !            38: NULL
        !            39: Done

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