xref: /PHP-8.0/ext/fileinfo/tests/bug74170.phpt (revision c5401854)
1--TEST--
2Bug #74170 locale information change after mime_content_type
3--SKIPIF--
4<?php
5if (!class_exists('finfo'))
6    die('skip no fileinfo extension');
7if (!extension_loaded('intl'))
8    die('skip intl extension not enabled');
9if (setlocale(LC_CTYPE, 'ru_RU.koi8r') === false)
10    die('skip ru_RU.koi8r locale is not available');
11?>
12--FILE--
13<?php
14var_dump(setlocale(LC_CTYPE, 'ru_RU.koi8r'));
15var_dump(nl_langinfo(CODESET));
16var_dump(mime_content_type(__DIR__ . '/resources/test.ppt'));
17var_dump(nl_langinfo(CODESET));
18?>
19--EXPECT--
20string(11) "ru_RU.koi8r"
21string(6) "KOI8-R"
22string(29) "application/vnd.ms-powerpoint"
23string(6) "KOI8-R"
24