Annotation of embedaddon/php/ext/fileinfo/tests/finfo_file_stream_001.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: finfo_file(): Files and directories inside an stream
! 3: --SKIPIF--
! 4: <?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
! 5: <?php if (!extension_loaded('zip')) { die("skip"); } ?>
! 6: --FILE--
! 7: <?php
! 8:
! 9: $fp = finfo_open(FILEINFO_MIME_TYPE);
! 10: $results = array();
! 11:
! 12: $zip = __DIR__ . "/resources/dir.zip";
! 13: $stream = "zip://" . __DIR__ . "/resources/dir.zip";
! 14: $dir = $stream . "#dir/";
! 15: $png = $stream . "#dir/test.png";
! 16:
! 17: var_dump(
! 18: finfo_file($fp, $zip),
! 19: finfo_file($fp, $dir),
! 20: finfo_file($fp, $png)
! 21: );
! 22: ?>
! 23: --EXPECTF--
! 24: string(15) "application/zip"
! 25: string(9) "directory"
! 26: string(9) "image/png"
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>