php-src/ext/fileinfo/tests/finfo_open_variation1.phpt

29 lines
887 B
Plaintext
Raw Normal View History

2008-08-29 10:34:34 +00:00
--TEST--
Test finfo_open() function : variations in opening
2009-03-15 23:16:55 +00:00
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
2008-08-29 10:34:34 +00:00
--FILE--
<?php
/* Prototype : resource finfo_open([int options [, string arg]])
2018-10-14 15:23:43 +00:00
* Description: Create a new fileinfo resource.
2008-08-29 10:34:34 +00:00
* Source code: ext/fileinfo/fileinfo.c
2018-10-14 15:23:43 +00:00
* Alias to functions:
2008-08-29 10:34:34 +00:00
*/
$magicFile = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'magic';
echo "*** Testing finfo_open() : variations in opening ***\n";
// Calling finfo_open() with different options
var_dump( finfo_open( FILEINFO_MIME | FILEINFO_SYMLINK, $magicFile ) );
//var_dump( finfo_open( FILEINFO_COMPRESS | FILEINFO_PRESERVE_ATIME, $magicFile ) );
2008-08-29 10:34:34 +00:00
var_dump( finfo_open( FILEINFO_DEVICES | FILEINFO_RAW, $magicFile ) );
?>
===DONE===
--EXPECTF--
*** Testing finfo_open() : variations in opening ***
resource(%d) of type (file_info)
resource(%d) of type (file_info)
===DONE===