1--TEST--
2Test finfo_open() function : basic functionality
3--EXTENSIONS--
4fileinfo
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 ***
28object(finfo)#%d (0) {
29}
30object(finfo)#%d (0) {
31}
32object(finfo)#%d (0) {
33}
34object(finfo)#%d (0) {
35}
36object(finfo)#%d (0) {
37}
38object(finfo)#%d (0) {
39}
40object(finfo)#%d (0) {
41}
42object(finfo)#%d (0) {
43}
44object(finfo)#%d (0) {
45}
46