cvs: php-src /ext/standard/tests/file open_basedir_copy_variation1.phpt

From: Date: Thu, 24 Apr 2008 16:40:54 +0000
Subject: cvs: php-src /ext/standard/tests/file open_basedir_copy_variation1.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-49737@lists.php.net to get a copy of this message
ant Thu Apr 24 16:40:54 2008 UTC Modified files: /php-src/ext/standard/tests/file open_basedir_copy_variation1.phpt Log: Extra open_basedir tests http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/open_basedir_copy_variation1.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/standard/tests/file/open_basedir_copy_variation1.phpt diff -u /dev/null php-src/ext/standard/tests/file/open_basedir_copy_variation1.phpt:1.2 --- /dev/null Thu Apr 24 16:40:54 2008 +++ php-src/ext/standard/tests/file/open_basedir_copy_variation1.phpt Thu Apr 24 16:40:54 2008 @@ -0,0 +1,35 @@ +--TEST-- +Test open_basedir configuration +--INI-- +open_basedir=. +--FILE-- +<?php +require_once "open_basedir.inc"; +test_open_basedir_before("copy"); +$directory = dirname(__FILE__); + +var_dump(copy("../bad/bad.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/bad.txt) is not within the allowed path(s): (.) in %s on line %d +bool(false) + +Warning: unlink(copy.txt): No such file or directory in %s on line %d +bool(false) +*** Finished testing open_basedir configuration [copy] *** +

« previous php.cvs (#49737) next »