From 907c24fd815286eea667c8fed64089e41147d3c5 Mon Sep 17 00:00:00 2001 From: Scott MacVicar Date: Fri, 29 Aug 2008 09:52:13 +0000 Subject: [PATCH] Test for fileinfo to check mime types. --- ext/fileinfo/tests/finfo_file_002.phpt | 30 +++++++++++++++++++++++++ ext/fileinfo/tests/resources/test.bmp | Bin 0 -> 58 bytes ext/fileinfo/tests/resources/test.gif | Bin 0 -> 43 bytes ext/fileinfo/tests/resources/test.jpg | Bin 0 -> 160 bytes ext/fileinfo/tests/resources/test.pdf | Bin 0 -> 1605 bytes ext/fileinfo/tests/resources/test.png | Bin 0 -> 93 bytes 6 files changed, 30 insertions(+) create mode 100644 ext/fileinfo/tests/finfo_file_002.phpt create mode 100644 ext/fileinfo/tests/resources/test.bmp create mode 100644 ext/fileinfo/tests/resources/test.gif create mode 100644 ext/fileinfo/tests/resources/test.jpg create mode 100644 ext/fileinfo/tests/resources/test.pdf create mode 100644 ext/fileinfo/tests/resources/test.png diff --git a/ext/fileinfo/tests/finfo_file_002.phpt b/ext/fileinfo/tests/finfo_file_002.phpt new file mode 100644 index 0000000000..b5c4a235bb --- /dev/null +++ b/ext/fileinfo/tests/finfo_file_002.phpt @@ -0,0 +1,30 @@ +--TEST-- +finfo_file(): Testing mime types +--FILE-- + +--EXPECTF-- +array(5) { + ["%s/resources/test.bmp"]=> + string(14) "image/x-ms-bmp" + ["%s/resources/test.gif"]=> + string(9) "image/gif" + ["%s/resources/test.jpg"]=> + string(10) "image/jpeg" + ["%s/resources/test.pdf"]=> + string(15) "application/pdf" + ["%s/resources/test.png"]=> + string(9) "image/png" +} diff --git a/ext/fileinfo/tests/resources/test.bmp b/ext/fileinfo/tests/resources/test.bmp new file mode 100644 index 0000000000000000000000000000000000000000..6403b09a22c849d9f30b698d379bf661eb39c049 GIT binary patch literal 58 lcmZ?rwPJt(Ga#h_#Eft(0hV9^l0w`N3>E+qXU?2q002zM1LXh! literal 0 HcmV?d00001 diff --git a/ext/fileinfo/tests/resources/test.gif b/ext/fileinfo/tests/resources/test.gif new file mode 100644 index 0000000000000000000000000000000000000000..803afc76e5554b92e45ed26694108a4a86c92d9a GIT binary patch literal 43 scmZ?wbhEHbWMp7u_`tw$=FAxe1_s5SEI^WhK?g*DWEhy3To@Uw0mZNe&j0`b literal 0 HcmV?d00001 diff --git a/ext/fileinfo/tests/resources/test.jpg b/ext/fileinfo/tests/resources/test.jpg new file mode 100644 index 0000000000000000000000000000000000000000..4a6d9b7f168da43e13946beb2cf8ae8167a9aa36 GIT binary patch literal 160 zcmex=d_5z|FzH2r@^I;r|f^5g;2CaDhYx V&_x;k-(uhZx`e@=!H56iGcS`S9T@gnA&VjGqF&~x6_A*JM;Sf=K6%t zzLCNzoezXXr@?u^Sci3jE@xpUWau!`>0fPQqti_y4IF>O%yQ(jL);2l9bjjaw<+tu z9gktIR`Q%~3PX#fFp}2XPrW-$bwX91%57_Dv(*W?xF9l5-3&o}mY1~z+80)=^n%ba z7A+t|he<8K{a3^L0PjcWjYx>#h==$U<*Sf~6h5 zLyeYR59p8qj*Y3YclvNUdy>h{@G)c1tt?1dGL;tE6*7{k5|?@lj|?#m-1TPkx(Q(+ z?4p3kMdD(Yn`{Q$@lzk)S<4wd$$Vj#5SK26#dT-oyBCNn5vh6 zDGKSyq}OuwEUiiep;vjLQ5j1Y8S_t zZ1Npb1Bun7)5aH-B5~N?wN#6xQwhptrOk9L5((Tfhby>Lwirv(*V$U4R@&v!q69J1@ZT1e(i+*Fm5SM z&f}<@YHQ@2pcrGqst@8Q3L}_9g*m3&2YH1B9E&xv7+Y#!VSv0fu!y5Tn^+g6-N0gw zEjO{~utqyZNi_VrXNUQ^@nODh_aGnV;X!|#M|g~HYjEDFVb%zIXpMjNr|K1T8sll_ ebL}r3^*YhoLiJ!2Rv7Eq=K*Vzqob?aA^8Phv8(a` literal 0 HcmV?d00001 diff --git a/ext/fileinfo/tests/resources/test.png b/ext/fileinfo/tests/resources/test.png new file mode 100644 index 0000000000000000000000000000000000000000..eed1c04628262e6aaa6eb3637d26738e154c4af0 GIT binary patch literal 93 zcmeAS@N?(olHy`uVBq!ia0vp^j36w)1SAhU@1F~#I14-?i-EKU7`vU!wgWQwJzX3_ jIIbsK6hAvN(>R?$;4sU{>^fu6{1-oD!M