Annotation of embedaddon/php/ext/mbstring/tests/mb_internal_encoding_error1.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Test mb_internal_encoding() function : error conditions - pass incorrect number of args
        !             3: --SKIPIF--
        !             4: <?php
        !             5: extension_loaded('mbstring') or die('skip');
        !             6: function_exists('mb_internal_encoding') or die("skip mb_internal_encoding() is not available in this build");
        !             7: ?> 
        !             8: --FILE--
        !             9: <?php
        !            10: /* Prototype  : string mb_internal_encoding([string $encoding])
        !            11:  * Description: Sets the current internal encoding or 
        !            12:  * Returns the current internal encoding as a string 
        !            13:  * Source code: ext/mbstring/mbstring.c
        !            14:  */
        !            15: 
        !            16: /*
        !            17:  * Test mb_internal_encoding with one more than the expected number of arguments
        !            18:  */
        !            19: 
        !            20: echo "*** Testing mb_internal_encoding() : error conditions ***\n";
        !            21: 
        !            22: echo "\n-- Testing mb_internal_encoding() function with more than expected no. of arguments --\n";
        !            23: $encoding = 'string_val';
        !            24: $extra_arg = 10;
        !            25: var_dump( mb_internal_encoding($encoding, $extra_arg) );
        !            26: 
        !            27: echo "Done";
        !            28: ?>
        !            29: --EXPECTF--
        !            30: *** Testing mb_internal_encoding() : error conditions ***
        !            31: 
        !            32: -- Testing mb_internal_encoding() function with more than expected no. of arguments --
        !            33: 
        !            34: Warning: mb_internal_encoding() expects at most 1 parameter, 2 given in %s on line %d
        !            35: bool(false)
        !            36: Done

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