diff options
| author | Fabien Villepinte <fabien.villepinte@gmail.com> | 2019-10-05 14:26:33 +0200 |
|---|---|---|
| committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-10-08 18:20:13 +0200 |
| commit | 8b5c351154284a88152ee3d166a32dc77316a658 (patch) | |
| tree | e38e10fe7b65983618ae29a290adea19a97f005d /ext/standard/tests/file/is_readable_basic.phpt | |
| parent | bea832cbf6b7a06ee65b93902233864c1ac9ec98 (diff) | |
| download | php-git-8b5c351154284a88152ee3d166a32dc77316a658.tar.gz | |
Avoid file clash in root_check skipifs
Extract root check into skipif_root.inc to share this commonly
repeated logic.
Closes GH-4779.
Diffstat (limited to 'ext/standard/tests/file/is_readable_basic.phpt')
| -rw-r--r-- | ext/standard/tests/file/is_readable_basic.phpt | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/ext/standard/tests/file/is_readable_basic.phpt b/ext/standard/tests/file/is_readable_basic.phpt index 5df3e36ddd..a3f72a3048 100644 --- a/ext/standard/tests/file/is_readable_basic.phpt +++ b/ext/standard/tests/file/is_readable_basic.phpt @@ -5,16 +5,7 @@ Test is_readable() function: basic functionality if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip not for windows'); } -// Skip if being run by root (files are always readable, writeable and executable) -$filename = __DIR__."/is_readable_basic_root_check.tmp"; -$fp = fopen($filename, 'w'); -fclose($fp); -if(fileowner($filename) == 0) { - unlink ($filename); - die('skip cannot be run as root'); -} - -unlink($filename); +require __DIR__ . '/../skipif_root.inc'; ?> --FILE-- <?php |
