diff options
| author | Greg Beaver <cellog@php.net> | 2008-10-13 04:50:37 +0000 |
|---|---|---|
| committer | Greg Beaver <cellog@php.net> | 2008-10-13 04:50:37 +0000 |
| commit | fdac2c9a12a90d16379c84fde9af07fa8c20bc75 (patch) | |
| tree | 9a8212334345b7ae320aeacdd8b60b801173095d | |
| parent | 3a5401755608ee00d6f42f0dae0cf54c0518a5f9 (diff) | |
| download | php-git-fdac2c9a12a90d16379c84fde9af07fa8c20bc75.tar.gz | |
increase code coverage
| -rw-r--r-- | ext/phar/tests/stat.phpt | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/ext/phar/tests/stat.phpt b/ext/phar/tests/stat.phpt index 020fc24f86..184aa6d2ec 100644 --- a/ext/phar/tests/stat.phpt +++ b/ext/phar/tests/stat.phpt @@ -14,7 +14,7 @@ $fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; $fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.tar'; $fname3 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar'; $a = new Phar($fname); -$a['index.php'] = '<?php +$a['my/index.php'] = '<?php echo "stat\n"; var_dump(stat("dir/file1.txt")); echo "lstat\n"; @@ -53,13 +53,17 @@ echo "is_file\n"; var_dump(is_file("dir/file1.txt")); echo "is_link\n"; var_dump(is_link("dir/file1.txt")); +echo "not found\n"; +var_dump(file_exists("not/found")); +echo "not found 2\n"; +var_dump(fileperms("not/found")); ?>'; $a['dir/file1.txt'] = 'hi'; $a['dir/file2.txt'] = 'hi2'; $a['dir/file3.txt'] = 'hi3'; $a->setStub('<?php set_include_path("phar://" . __FILE__ . "/dir" . PATH_SEPARATOR . "phar://" . __FILE__); -include "index.php"; +include "my/index.php"; __HALT_COMPILER();'); include $fname; ?> @@ -212,4 +216,10 @@ is_file bool(true) is_link bool(false) +not found +bool(false) +not found 2 + +Warning: fileperms(): stat failed for not/found in phar://%sstat.phar.php/my/index.php on line %d +bool(false) ===DONE===
\ No newline at end of file |
