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

1.1     ! misho       1: --TEST--
        !             2: Test mb_strtoupper() function : error conditions - pass an unknown encoding
        !             3: --SKIPIF--
        !             4: <?php
        !             5: extension_loaded('mbstring') or die('skip');
        !             6: function_exists('mb_strtoupper') or die("skip mb_strtoupper() is not available in this build");
        !             7: ?>
        !             8: --FILE--
        !             9: <?php
        !            10: /* Prototype  : string mb_strtoupper(string $sourcestring [, string $encoding]
        !            11:  * Description: Returns a uppercased version of $sourcestring
        !            12:  * Source code: ext/mbstring/mbstring.c
        !            13:  */
        !            14: 
        !            15: /*
        !            16:  * Pass an unknown encoding as $encoding argument to check behaviour of mbstrtoupper()
        !            17:  */
        !            18: 
        !            19: echo "*** Testing mb_strtoupper() : error conditions ***\n";
        !            20: 
        !            21: $sourcestring = 'hello, world';
        !            22: $encoding = 'unknown-encoding';
        !            23: 
        !            24: var_dump( mb_strtoupper($sourcestring, $encoding) );
        !            25: 
        !            26: echo "Done";
        !            27: ?>
        !            28: 
        !            29: --EXPECTF--
        !            30: *** Testing mb_strtoupper() : error conditions ***
        !            31: 
        !            32: Warning: mb_strtoupper(): Unknown encoding "unknown-encoding" in %s on line %d
        !            33: bool(false)
        !            34: Done

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