Skip to content

Commit 1240c12

Browse files
committed
Merge branch 'PHP-7.4'
2 parents 4d52975 + ce41795 commit 1240c12

File tree

4 files changed

+9
-35
lines changed

4 files changed

+9
-35
lines changed

ext/standard/tests/file/windows_acls/bug44859.phpt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ skipif();
77
?>
88
--FILE--
99
<?php
10+
$uniqueBasePath = substr(__FILE__, 0, strrpos(__FILE__, '.'));
1011
include_once __DIR__ . '/common.inc';
1112
fix_acls();
1213

@@ -19,7 +20,7 @@ $iteration = array(
1920

2021
echo "Testing file:\n";
2122
$i = 1;
22-
$path = __DIR__ . '/a.txt';
23+
$path = $uniqueBasePath . '_file.txt';
2324
foreach ($iteration as $perms => $exp) {
2425
create_file($path, $perms);
2526
clearstatcache(true, $path);
@@ -34,7 +35,7 @@ foreach ($iteration as $perms => $exp) {
3435
}
3536

3637
echo "Testing directory:\n";
37-
$path = __DIR__ . '/adir';
38+
$path = $uniqueBasePath . '_dir';
3839
$i = 1;
3940
foreach ($iteration as $perms => $exp) {
4041
create_dir($path, $perms);

ext/standard/tests/file/windows_acls/bug44859_2.phpt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ skipif();
77
?>
88
--FILE--
99
<?php
10+
$uniqueBasePath = substr(__FILE__, 0, strrpos(__FILE__, '.'));
1011
include_once __DIR__ . '/common.inc';
1112
fix_acls();
1213

@@ -19,7 +20,7 @@ $iteration = array(
1920

2021
echo "Testing file:\n";
2122
$i = 1;
22-
$path = __DIR__ . '/a.txt';
23+
$path = $uniqueBasePath . '_file.txt';
2324
foreach ($iteration as $perms => $exp) {
2425
create_file($path, $perms);
2526
clearstatcache(true, $path);
@@ -34,7 +35,7 @@ foreach ($iteration as $perms => $exp) {
3435
}
3536

3637
echo "Testing directory:\n";
37-
$path = __DIR__ . '/adir';
38+
$path = $uniqueBasePath . '_dir';
3839
$i = 1;
3940
foreach ($iteration as $perms => $exp) {
4041
create_dir($path, $perms);

ext/standard/tests/file/windows_acls/bug44859_4.phpt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ skipif();
99
?>
1010
--FILE--
1111
<?php
12+
$uniqueBaseName = basename(substr(__FILE__, 0, strrpos(__FILE__, '.')));
1213
include_once __DIR__ . '/common.inc';
1314
fix_acls();
1415

@@ -21,7 +22,7 @@ $iteration = array(
2122

2223
echo "Testing file with relative path:\n";
2324
$i = 1;
24-
$path = './a.txt';
25+
$path = './' . $uniqueBaseName . '_file.txt';
2526
foreach ($iteration as $perms => $exp) {
2627
create_file($path, $perms);
2728
clearstatcache(true, $path);
@@ -36,7 +37,7 @@ foreach ($iteration as $perms => $exp) {
3637
}
3738

3839
echo "Testing directory with relative path:\n";
39-
$path = 'adir';
40+
$path = $uniqueBaseName . '_dir';
4041
$i = 1;
4142
foreach ($iteration as $perms => $exp) {
4243
create_dir($path, $perms);

ext/standard/tests/file/windows_acls/common.inc

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -168,32 +168,3 @@ function delete_dir($path) {
168168
return;
169169
}
170170
}
171-
if (0) {
172-
$path = __DIR__ . '/a.txt';
173-
create_file($path, PHPT_ACL_NONE);
174-
if (!is_writable($path)) {
175-
echo "PHPT_ACL_NONE success!!\n";
176-
} else {
177-
echo "PHPT_ACL_NONE failed!!\n";
178-
}
179-
delete_file($path);
180-
181-
$path = __DIR__ . '/a.txt';
182-
create_file($path, PHPT_ACL_READ);
183-
if (!is_writable($path)) {
184-
echo "PHPT_ACL_READ success!!\n";
185-
} else {
186-
echo "PHPT_ACL_READ failed!!\n";
187-
}
188-
delete_file($path);
189-
190-
$path = __DIR__ . '/adir';
191-
create_dir($path, PHPT_ACL_READ);
192-
if (!is_writable($path)) {
193-
echo "PHPT_ACL_READ dir success!!\n";
194-
} else {
195-
echo "PHPT_ACL_READ dir failed!!\n";
196-
}
197-
delete_dir($path);
198-
199-
}

0 commit comments

Comments
 (0)