diff options
| author | Antony Dovgal <tony2001@php.net> | 2006-11-16 13:00:03 +0000 |
|---|---|---|
| committer | Antony Dovgal <tony2001@php.net> | 2006-11-16 13:00:03 +0000 |
| commit | 107229611b88232a54c45857cdc28ac09919b80f (patch) | |
| tree | ad1fa0ae7c0fa243cf29ad5046e683b89d47699d /ext/standard/tests/file/touch.phpt | |
| parent | 01bab920ddc310cab709f39971fc46dc9b27318f (diff) | |
| download | php-git-107229611b88232a54c45857cdc28ac09919b80f.tar.gz | |
more new tests, yikes!
Diffstat (limited to 'ext/standard/tests/file/touch.phpt')
| -rw-r--r-- | ext/standard/tests/file/touch.phpt | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/ext/standard/tests/file/touch.phpt b/ext/standard/tests/file/touch.phpt new file mode 100644 index 0000000000..da720d4aba --- /dev/null +++ b/ext/standard/tests/file/touch.phpt @@ -0,0 +1,49 @@ +--TEST-- +touch() tests +--FILE-- +<?php + +$filename = dirname(__FILE__)."/touch.dat"; + +var_dump(touch()); +var_dump(touch($filename)); +var_dump(filemtime($filename)); +@unlink($filename); +var_dump(touch($filename, 101)); +var_dump(filemtime($filename)); + +@unlink($filename); +var_dump(touch($filename, -1)); +var_dump(filemtime($filename)); + +@unlink($filename); +var_dump(touch($filename, 100, 100)); +var_dump(filemtime($filename)); + +@unlink($filename); +var_dump(touch($filename, 100, -100)); +var_dump(filemtime($filename)); + +var_dump(touch("/no/such/file/or/directory")); + +@unlink($filename); + +echo "Done\n"; +?> +--EXPECTF-- +Warning: touch() expects at least 1 parameter, 0 given in %s on line %d +NULL +bool(true) +int(%d) +bool(true) +int(101) +bool(true) +int(-1) +bool(true) +int(100) +bool(true) +int(100) + +Warning: touch(): Unable to create file /no/such/file/or/directory because No such file or directory in %s on line %d +bool(false) +Done |
