php-src/ext/fileinfo/tests/finfo_file_stream_001.phpt
Gabriel Caruso c93aba042f
Give a reason why the test was skipped
This will help us debug why a test was skipped in GCOV
(http://gcov.php.net/viewer.php?version=PHP_HEAD&func=skip), and maybe
put them to run again
2018-07-22 16:41:41 -03:00

27 lines
635 B
PHP

--TEST--
finfo_file(): Files and directories inside an stream
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
<?php if (!extension_loaded('zip')) { die("skip zip extension not loaded"); } ?>
--FILE--
<?php
$fp = finfo_open(FILEINFO_MIME_TYPE);
$results = array();
$zip = __DIR__ . "/resources/dir.zip";
$stream = "zip://" . __DIR__ . "/resources/dir.zip";
$dir = $stream . "#dir/";
$png = $stream . "#dir/test.png";
var_dump(
finfo_file($fp, $zip),
finfo_file($fp, $dir),
finfo_file($fp, $png)
);
?>
--EXPECT--
string(15) "application/zip"
string(9) "directory"
string(9) "image/png"