diff options
author | Fabien Villepinte <fabien.villepinte@gmail.com> | 2019-11-09 13:55:42 +0100 |
---|---|---|
committer | Fabien Villepinte <fabien.villepinte@gmail.com> | 2019-11-09 13:55:42 +0100 |
commit | ce41795a9f7eac181e6ac38daf3964fc7eb822e2 (patch) | |
tree | 5ba65d4b6317ae453ed044fb757214ce8c2b677c /ext/standard | |
parent | 9c4b989c751204ce25f85c9e9b97bff1cd897165 (diff) | |
download | php-git-ce41795a9f7eac181e6ac38daf3964fc7eb822e2.tar.gz |
Fix conflicts in windows ACL tests
Closes GH-4898.
Diffstat (limited to 'ext/standard')
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); - -} |