Annotation of embedaddon/php/ext/mbstring/tests/mb_internal_encoding_basic.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Test mb_internal_encoding() function : basic functionality
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 Returns
12: * the current internal encoding as a string
13: * Source code: ext/mbstring/mbstring.c
14: */
15:
16: /*
17: * Test basic functionality of mb_internal_encoding
18: */
19:
20: echo "*** Testing mb_internal_encoding() : basic functionality ***\n";
21:
22: var_dump(mb_internal_encoding()); //default internal encoding
23:
24: var_dump(mb_internal_encoding('UTF-8')); //change internal encoding to UTF-8
25:
26: var_dump(mb_internal_encoding()); //check internal encoding is now set to UTF-8
27:
28:
29: echo "Done";
30: ?>
31: --EXPECTF--
32: *** Testing mb_internal_encoding() : basic functionality ***
33: string(%d) "%s"
34: bool(true)
35: string(5) "UTF-8"
36: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>