From: Anatol Belski Date: Thu, 30 May 2019 11:31:48 +0000 (+0200) Subject: Add test for bug #78075, json detection X-Git-Tag: php-7.4.0alpha1~147 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=aed9a64cf673225c25e5175a0ee700b497d8d4e3;p=php Add test for bug #78075, json detection --- diff --git a/ext/fileinfo/tests/finfo_file_002.phpt b/ext/fileinfo/tests/finfo_file_002.phpt index 683be5b676..fff16b7796 100644 --- a/ext/fileinfo/tests/finfo_file_002.phpt +++ b/ext/fileinfo/tests/finfo_file_002.phpt @@ -29,6 +29,8 @@ array(%d) { string(9) "image/gif" ["%s/resources/test.jpg"]=> string(10) "image/jpeg" + ["%s/test.json"]=> + string(16) "application/json" ["%s/resources/test.mp3"]=> string(10) "audio/mpeg" ["%s/resources/test.pdf"]=> diff --git a/ext/fileinfo/tests/resources/test.json b/ext/fileinfo/tests/resources/test.json new file mode 100644 index 0000000000..1d8a9529d8 --- /dev/null +++ b/ext/fileinfo/tests/resources/test.json @@ -0,0 +1,13 @@ +{ + "abc": "edf", + "json": "crab", + "ololo": [ + 1, + 2, + 3 + ], + "subcrab": { + "name": "crab", + "surname": "subcrab" + } +}