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