Skip to content

Fix conflicts in windows ACL tests #4898

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions ext/standard/tests/file/windows_acls/bug44859.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ skipif();
?>
--FILE--
<?php
$uniqueBasePath = substr(__FILE__, 0, strrpos(__FILE__, '.'));
include_once __DIR__ . '/common.inc';
fix_acls();

Expand All @@ -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);
Expand All @@ -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);
Expand Down
5 changes: 3 additions & 2 deletions ext/standard/tests/file/windows_acls/bug44859_2.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ skipif();
?>
--FILE--
<?php
$uniqueBasePath = substr(__FILE__, 0, strrpos(__FILE__, '.'));
include_once __DIR__ . '/common.inc';
fix_acls();

Expand All @@ -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);
Expand All @@ -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);
Expand Down
5 changes: 3 additions & 2 deletions ext/standard/tests/file/windows_acls/bug44859_4.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ skipif();
?>
--FILE--
<?php
$uniqueBaseName = basename(substr(__FILE__, 0, strrpos(__FILE__, '.')));
include_once __DIR__ . '/common.inc';
fix_acls();

Expand All @@ -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);
Expand All @@ -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);
Expand Down
29 changes: 0 additions & 29 deletions ext/standard/tests/file/windows_acls/common.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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);

}