1--TEST-- 2finfo_open(): Testing magic_file names 3--SKIPIF-- 4<?php require_once(__DIR__ . '/skipif.inc'); ?> 5--FILE-- 6<?php 7 8var_dump(finfo_open(FILEINFO_MIME, "\0")); 9var_dump(finfo_open(FILEINFO_MIME, NULL)); 10var_dump(finfo_open(FILEINFO_MIME, '')); 11var_dump(finfo_open(FILEINFO_MIME, 123)); 12var_dump(finfo_open(FILEINFO_MIME, 1.0)); 13var_dump(finfo_open(FILEINFO_MIME, '/foo/bar/inexistent')); 14 15?> 16--EXPECTF-- 17Warning: finfo_open() expects parameter 2 to be a valid path, string given in %s on line %d 18bool(false) 19resource(%d) of type (file_info) 20resource(%d) of type (file_info) 21 22Warning: finfo_open(%s123): failed to open stream: No such file or directory in %s on line %d 23 24Warning: finfo_open(%s123): failed to open stream: No such file or directory in %s on line %d 25 26Warning: finfo_open(): Failed to load magic database at '%s123'. in %s on line %d 27bool(false) 28 29Warning: finfo_open(%s1): failed to open stream: No such file or directory in %s on line %d 30 31Warning: finfo_open(%s1): failed to open stream: No such file or directory in %s on line %d 32 33Warning: finfo_open(): Failed to load magic database at '%s1'. in %s on line %d 34bool(false) 35 36Warning: finfo_open(%sinexistent): failed to open stream: No such file or directory in %s on line %d 37 38Warning: finfo_open(%sinexistent): failed to open stream: No such file or directory in %s on line %d 39 40Warning: finfo_open(): Failed to load magic database at '%sinexistent'. in %s on line %d 41bool(false) 42