diff options
author | Fabien Villepinte <fabien.villepinte@gmail.com> | 2019-11-09 13:56:23 +0100 |
---|---|---|
committer | Fabien Villepinte <fabien.villepinte@gmail.com> | 2019-11-09 13:56:23 +0100 |
commit | 1240c122a17498f204d1433cc5daf5d3d3944ec9 (patch) | |
tree | 00af3ca23d3c0ebbd016c4c7bfa93ec52f16d3c5 /ext/standard/tests | |
parent | 4d529757f84cb81d5eba53e77e8395efe4e54334 (diff) | |
parent | ce41795a9f7eac181e6ac38daf3964fc7eb822e2 (diff) | |
download | php-git-1240c122a17498f204d1433cc5daf5d3d3944ec9.tar.gz |
Merge branch 'PHP-7.4'
Diffstat (limited to 'ext/standard/tests')
4 files changed, 9 insertions, 35 deletions
diff --git a/ext/standard/tests/file/windows_acls/bug44859.phpt b/ext/standard/tests/file/windows_acls/bug44859.phpt index 20e10f5c5b..679734b379 100644 --- a/ext/standard/tests/file/windows_acls/bug44859.phpt +++ b/ext/standard/tests/file/windows_acls/bug44859.phpt @@ -7,6 +7,7 @@ skipif(); ?> --FILE-- <?php +$uniqueBasePath = substr(__FILE__, 0, strrpos(__FILE__, '.')); include_once __DIR__ . '/common.inc'; fix_acls(); @@ -19,7 +20,7 @@ $iteration = array( echo "Testing file:\n"; $i = 1; -$path = __DIR__ . '/a.txt'; +$path = $uniqueBasePath . '_file.txt'; foreach ($iteration as $perms => $exp) { create_file($path, $perms); clearstatcache(true, $path); @@ -34,7 +35,7 @@ foreach ($iteration as $perms => $exp) { } echo "Testing directory:\n"; -$path = __DIR__ . '/adir'; +$path = $uniqueBasePath . '_dir'; $i = 1; foreach ($iteration as $perms => $exp) { create_dir($path, $perms); diff --git a/ext/standard/tests/file/windows_acls/bug44859_2.phpt b/ext/standard/tests/file/windows_acls/bug44859_2.phpt index 583e63a2a6..b88d07f820 100644 --- a/ext/standard/tests/file/windows_acls/bug44859_2.phpt +++ b/ext/standard/tests/file/windows_acls/bug44859_2.phpt @@ -7,6 +7,7 @@ skipif(); ?> --FILE-- <?php +$uniqueBasePath = substr(__FILE__, 0, strrpos(__FILE__, '.')); include_once __DIR__ . '/common.inc'; fix_acls(); @@ -19,7 +20,7 @@ $iteration = array( echo "Testing file:\n"; $i = 1; -$path = __DIR__ . '/a.txt'; +$path = $uniqueBasePath . '_file.txt'; foreach ($iteration as $perms => $exp) { create_file($path, $perms); clearstatcache(true, $path); @@ -34,7 +35,7 @@ foreach ($iteration as $perms => $exp) { } echo "Testing directory:\n"; -$path = __DIR__ . '/adir'; +$path = $uniqueBasePath . '_dir'; $i = 1; foreach ($iteration as $perms => $exp) { create_dir($path, $perms); diff --git a/ext/standard/tests/file/windows_acls/bug44859_4.phpt b/ext/standard/tests/file/windows_acls/bug44859_4.phpt index 452581fa05..e0fbe11f4b 100644 --- a/ext/standard/tests/file/windows_acls/bug44859_4.phpt +++ b/ext/standard/tests/file/windows_acls/bug44859_4.phpt @@ -9,6 +9,7 @@ skipif(); ?> --FILE-- <?php +$uniqueBaseName = basename(substr(__FILE__, 0, strrpos(__FILE__, '.'))); include_once __DIR__ . '/common.inc'; fix_acls(); @@ -21,7 +22,7 @@ $iteration = array( echo "Testing file with relative path:\n"; $i = 1; -$path = './a.txt'; +$path = './' . $uniqueBaseName . '_file.txt'; foreach ($iteration as $perms => $exp) { create_file($path, $perms); clearstatcache(true, $path); @@ -36,7 +37,7 @@ foreach ($iteration as $perms => $exp) { } echo "Testing directory with relative path:\n"; -$path = 'adir'; +$path = $uniqueBaseName . '_dir'; $i = 1; foreach ($iteration as $perms => $exp) { create_dir($path, $perms); diff --git a/ext/standard/tests/file/windows_acls/common.inc b/ext/standard/tests/file/windows_acls/common.inc index b292745a6b..5d4b402840 100644 --- a/ext/standard/tests/file/windows_acls/common.inc +++ b/ext/standard/tests/file/windows_acls/common.inc @@ -168,32 +168,3 @@ function delete_dir($path) { return; } } -if (0) { -$path = __DIR__ . '/a.txt'; -create_file($path, PHPT_ACL_NONE); -if (!is_writable($path)) { - echo "PHPT_ACL_NONE success!!\n"; -} else { - echo "PHPT_ACL_NONE failed!!\n"; -} -delete_file($path); - -$path = __DIR__ . '/a.txt'; -create_file($path, PHPT_ACL_READ); -if (!is_writable($path)) { - echo "PHPT_ACL_READ success!!\n"; -} else { - echo "PHPT_ACL_READ failed!!\n"; -} -delete_file($path); - -$path = __DIR__ . '/adir'; -create_dir($path, PHPT_ACL_READ); -if (!is_writable($path)) { - echo "PHPT_ACL_READ dir success!!\n"; -} else { - echo "PHPT_ACL_READ dir failed!!\n"; -} -delete_dir($path); - -} |