1--TEST--
2Test finfo_open() function : basic functionality
3--SKIPIF--
4<?php require_once(__DIR__ . '/skipif.inc'); ?>
5--FILE--
6<?php
7$magicFile = __DIR__ . DIRECTORY_SEPARATOR . 'magic';
8
9echo "*** Testing finfo_open() : basic functionality ***\n";
10
11// Calling finfo_open() with different options
12var_dump( finfo_open( FILEINFO_MIME, $magicFile ) );
13var_dump( finfo_open( FILEINFO_NONE, $magicFile ) );
14var_dump( finfo_open( FILEINFO_SYMLINK, $magicFile ) );
15//var_dump( finfo_open( FILEINFO_COMPRESS, $magicFile ) );
16var_dump( finfo_open( FILEINFO_DEVICES, $magicFile ) );
17var_dump( finfo_open( FILEINFO_CONTINUE, $magicFile ) );
18var_dump( finfo_open( FILEINFO_PRESERVE_ATIME, $magicFile ) );
19var_dump( finfo_open( FILEINFO_RAW, $magicFile ) );
20
21// OO interface to finfo
22var_dump( new finfo( FILEINFO_MIME, $magicFile ) );
23var_dump( new finfo() );
24
25?>
26--EXPECTF--
27*** Testing finfo_open() : basic functionality ***
28resource(%d) of type (file_info)
29resource(%d) of type (file_info)
30resource(%d) of type (file_info)
31resource(%d) of type (file_info)
32resource(%d) of type (file_info)
33resource(%d) of type (file_info)
34resource(%d) of type (file_info)
35object(finfo)#%d (%d) {
36}
37object(finfo)#%d (%d) {
38}
39