com php-src: Add test for bug #78075, json detection: ext/fileinfo/tests/finfo_file_002.phpt ext/filein fo/tests/resources/test.json

From: Date: Thu, 30 May 2019 11:31:48 +0000
Subject: com php-src: Add test for bug #78075, json detection: ext/fileinfo/tests/finfo_file_002.phpt ext/filein fo/tests/resources/test.json
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-106458@lists.php.net to get a copy of this message
Commit: aed9a64cf673225c25e5175a0ee700b497d8d4e3 Author: Anatol Belski <ab@php.net> Thu, 30 May 2019 13:31:48 +0200 Parents: a3879208c5b3e39593129a2b438ec39d6a0c20da Branches: PHP-7.4 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=aed9a64cf673225c25e5175a0ee700b497d8d4e3 Log: Add test for bug #78075, json detection Bugs: https://bugs.php.net/78075 Changed paths: M ext/fileinfo/tests/finfo_file_002.phpt A ext/fileinfo/tests/resources/test..json Diff: diff --git a/ext/fileinfo/tests/finfo_file_002.phpt b/ext/fileinfo/tests/finfo_file_002.phpt index 683be5b..fff16b7 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 0000000..1d8a952 --- /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" + } +}

« previous php.cvs (#106458) next »