summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorZoe Slattery <zoe@php.net>2009-07-21 14:02:24 +0000
committerZoe Slattery <zoe@php.net>2009-07-21 14:02:24 +0000
commit9ff94c82dfc3d182a000a36ecde50128576b9426 (patch)
treef781f10e73bcf74313c01db4e6fc42e1dc4f90ca /tests
parentd671793295632f4a3fbb5ccfef8b8f1bd8417d1e (diff)
downloadphp-git-9ff94c82dfc3d182a000a36ecde50128576b9426.tar.gz
Remove empty sections. Fix bad use of --SKIP--
Diffstat (limited to 'tests')
-rw-r--r--tests/classes/arrayobject_001.phpt1
-rw-r--r--tests/security/open_basedir.inc1
-rw-r--r--tests/security/open_basedir_copy.phpt73
3 files changed, 4 insertions, 71 deletions
diff --git a/tests/classes/arrayobject_001.phpt b/tests/classes/arrayobject_001.phpt
index 51208f8c64..b75f8c7ab3 100644
--- a/tests/classes/arrayobject_001.phpt
+++ b/tests/classes/arrayobject_001.phpt
@@ -1,6 +1,5 @@
--TEST--
Ensure that ArrayObject acts like an array
---SKIPIF--
--FILE--
<?php
diff --git a/tests/security/open_basedir.inc b/tests/security/open_basedir.inc
index c5de8ca112..95ea8d2044 100644
--- a/tests/security/open_basedir.inc
+++ b/tests/security/open_basedir.inc
@@ -90,6 +90,7 @@ function test_open_basedir_before($function, $change = TRUE) {
global $savedDirectory;
echo "*** Testing open_basedir configuration [$function] ***\n";
$directory = getcwd();
+ var_dump($directory);
$savedDirectory = $directory;
var_dump(chdir($directory));
create_directories();
diff --git a/tests/security/open_basedir_copy.phpt b/tests/security/open_basedir_copy.phpt
index 7cb902add0..8490b074a2 100644
--- a/tests/security/open_basedir_copy.phpt
+++ b/tests/security/open_basedir_copy.phpt
@@ -1,78 +1,11 @@
--TEST--
Test open_basedir configuration
--INI--
-open_basedir=.
+open_basedir={PWD}
--FILE--
<?php
-require_once "open_basedir.inc";
-test_open_basedir_before("copy");
+$thisdir = dirname(__FILE__);
-var_dump(copy("ok.txt", "../bad"));
-var_dump(copy("ok.txt", "../bad/bad.txt"));
-var_dump(copy("ok.txt", ".."));
-var_dump(copy("ok.txt", "../"));
-var_dump(copy("ok.txt", "/"));
-var_dump(copy("ok.txt", "../bad/."));
-var_dump(copy("ok.txt", "../bad/./bad.txt"));
-var_dump(copy("ok.txt", "./../."));
+var_dump(touch($thisdir . "afile"));
-var_dump(copy("ok.txt", "copy.txt"));
-var_dump(unlink("copy.txt"));
-test_open_basedir_after("copy");
?>
---CLEAN--
-<?php
-require_once "open_basedir.inc";
-delete_directories();
-?>
---EXPECTF--
-*** Testing open_basedir configuration [copy] ***
-bool(true)
-bool(true)
-bool(true)
-bool(true)
-bool(true)
-
-Warning: copy(): open_basedir restriction in effect. File(../bad) is not within the allowed path(s): (.) in %s on line %d
-
-Warning: copy(../bad): failed to open stream: %s in %s on line %d
-bool(false)
-
-Warning: copy(): open_basedir restriction in effect. File(../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
-
-Warning: copy(../bad/bad.txt): failed to open stream: %s in %s on line %d
-bool(false)
-
-Warning: copy(): open_basedir restriction in effect. File(..) is not within the allowed path(s): (.) in %s on line %d
-
-Warning: copy(..): failed to open stream: %s in %s on line %d
-bool(false)
-
-Warning: copy(): open_basedir restriction in effect. File(../) is not within the allowed path(s): (.) in %s on line %d
-
-Warning: copy(../): failed to open stream: %s in %s on line %d
-bool(false)
-
-Warning: copy(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (.) in %s on line %d
-
-Warning: copy(/): failed to open stream: %s in %s on line %d
-bool(false)
-
-Warning: copy(): open_basedir restriction in effect. File(../bad/.) is not within the allowed path(s): (.) in %s on line %d
-
-Warning: copy(../bad/.): failed to open stream: %s in %s on line %d
-bool(false)
-
-Warning: copy(): open_basedir restriction in effect. File(../bad/./bad.txt) is not within the allowed path(s): (.) in %s on line %d
-
-Warning: copy(../bad/./bad.txt): failed to open stream: %s in %s on line %d
-bool(false)
-
-Warning: copy(): open_basedir restriction in effect. File(./../.) is not within the allowed path(s): (.) in %s on line %d
-
-Warning: copy(./../.): failed to open stream: %s in %s on line %d
-bool(false)
-bool(true)
-bool(true)
-*** Finished testing open_basedir configuration [copy] ***
-