From aed9a64cf673225c25e5175a0ee700b497d8d4e3 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Thu, 30 May 2019 13:31:48 +0200 Subject: [PATCH] Add test for bug #78075, json detection --- ext/fileinfo/tests/finfo_file_002.phpt | 2 ++ ext/fileinfo/tests/resources/test.json | 13 +++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 ext/fileinfo/tests/resources/test.json 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" + } +} -- 2.50.1