Closes GH-4898.
?>
--FILE--
<?php
+$uniqueBasePath = substr(__FILE__, 0, strrpos(__FILE__, '.'));
include_once __DIR__ . '/common.inc';
fix_acls();
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);
}
echo "Testing directory:\n";
-$path = __DIR__ . '/adir';
+$path = $uniqueBasePath . '_dir';
$i = 1;
foreach ($iteration as $perms => $exp) {
create_dir($path, $perms);
?>
--FILE--
<?php
+$uniqueBasePath = substr(__FILE__, 0, strrpos(__FILE__, '.'));
include_once __DIR__ . '/common.inc';
fix_acls();
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);
}
echo "Testing directory:\n";
-$path = __DIR__ . '/adir';
+$path = $uniqueBasePath . '_dir';
$i = 1;
foreach ($iteration as $perms => $exp) {
create_dir($path, $perms);
?>
--FILE--
<?php
+$uniqueBaseName = basename(substr(__FILE__, 0, strrpos(__FILE__, '.')));
include_once __DIR__ . '/common.inc';
fix_acls();
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);
}
echo "Testing directory with relative path:\n";
-$path = 'adir';
+$path = $uniqueBaseName . '_dir';
$i = 1;
foreach ($iteration as $perms => $exp) {
create_dir($path, $perms);
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);
-
-}