Annotation of embedaddon/php/ext/standard/tests/file/rename_variation7.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Test rename() function: usage variations-8
3: --SKIPIF--
4: <?php
5: if (substr(PHP_OS, 0, 3) == 'WIN') die('skip.. not for Windows');
6: if (!function_exists("symlink")) die("skip symlinks are not supported");
7: ?>
8: --FILE--
9: <?php
10:
11: $tmp_link = __FILE__.".tmp.link";
12: $tmp_link2 = __FILE__.".tmp.link2";
13:
14: symlink(dirname(__FILE__)."/there_is_no_such_file", $tmp_link);
15: rename($tmp_link, $tmp_link2);
16:
17: clearstatcache();
18:
19: var_dump(readlink($tmp_link));
20: var_dump(readlink($tmp_link2));
21:
22: @unlink($tmp_link);
23: @unlink($tmp_link2);
24:
25: echo "Done\n";
26: ?>
27: --EXPECTF--
28: Warning: readlink(): No such file or directory in %s on line %d
29: bool(false)
30: string(%d) "%sthere_is_no_such_file"
31: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>