php-src/ext/standard/tests/file/fileinode_basic.phpt
Christoph M. Becker 371e29ef3a Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix tests regarding negative fileinode()
2020-07-15 16:39:54 +02:00

31 lines
606 B
PHP

--TEST--
Test fileinode() function: Basic functionality
--FILE--
<?php
echo "*** Testing fileinode() with file, directory ***\n";
/* Getting inode of created file */
$file_path = __DIR__;
fopen("$file_path/inode.tmp", "w");
print( fileinode("$file_path/inode.tmp") )."\n";
/* Getting inode of current file */
print( fileinode(__FILE__) )."\n";
/* Getting inode of directories */
print( fileinode(".") )."\n";
print( fileinode("./..") )."\n";
echo "\n*** Done ***";
--CLEAN--
<?php
unlink (__DIR__."/inode.tmp");
?>
--EXPECTF--
*** Testing fileinode() with file, directory ***
%i
%i
%i
%i
*** Done ***