summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2020-04-28 17:42:52 +0200
committerChristoph M. Becker <cmbecker69@gmx.de>2020-04-29 09:07:53 +0200
commit0b04b9347f5dfa42b3dc3f9791d5c8d36157cb8d (patch)
tree49018ad902054c3d0e69d254b4ab9f4c16a229c7
parent5a6373f904c6497551cd53baf323ddb854a553e1 (diff)
downloadphp-git-0b04b9347f5dfa42b3dc3f9791d5c8d36157cb8d.tar.gz
Enclose contents of CLEAN sections in PHP tags
We also place the CLEAN sections before EXPECT(F), and remove extraneous clean-ups.
-rw-r--r--ext/openssl/tests/bug76296.phpt6
-rw-r--r--ext/phar/tests/bug66960.phpt2
-rw-r--r--ext/session/tests/session_save_path_variation4.phpt3
-rw-r--r--ext/session/tests/session_save_path_variation5.phpt2
-rw-r--r--ext/standard/tests/array/end_64bit.phpt4
-rw-r--r--ext/standard/tests/streams/proc_open_bug60120.phpt7
6 files changed, 15 insertions, 9 deletions
diff --git a/ext/openssl/tests/bug76296.phpt b/ext/openssl/tests/bug76296.phpt
index 41e3b9984e..0ac583d13e 100644
--- a/ext/openssl/tests/bug76296.phpt
+++ b/ext/openssl/tests/bug76296.phpt
@@ -14,8 +14,10 @@ ini_set('open_basedir', $dir);
var_dump(openssl_pkey_get_public($pem));
?>
+--CLEAN--
+<?php
+@rmdir(__DIR__ . '/bug76296_openbasedir');
+?>
--EXPECTF--
Warning: openssl_pkey_get_public(): open_basedir restriction in effect. File(%s) is not within the allowed path(s): (%s) in %s on line %d
bool(false)
---CLEAN--
-@rmdir(__DIR__ . '/bug76296_openbasedir');
diff --git a/ext/phar/tests/bug66960.phpt b/ext/phar/tests/bug66960.phpt
index 0d2ffa6df0..a2616c5e3a 100644
--- a/ext/phar/tests/bug66960.phpt
+++ b/ext/phar/tests/bug66960.phpt
@@ -15,8 +15,10 @@ var_dump(file_exists("phar://$file/". str_repeat('a', PHP_MAXPATHLEN+1)));
echo 'done';
?>
--CLEAN--
+<?php
$file = __DIR__ . DIRECTORY_SEPARATOR . 'bug66960.phar';
unlink($file);
+?>
--EXPECT--
bool(false)
bool(false)
diff --git a/ext/session/tests/session_save_path_variation4.phpt b/ext/session/tests/session_save_path_variation4.phpt
index a95b990dbc..c59a39ece3 100644
--- a/ext/session/tests/session_save_path_variation4.phpt
+++ b/ext/session/tests/session_save_path_variation4.phpt
@@ -42,10 +42,11 @@ echo "Done";
ob_end_flush();
?>
--CLEAN--
+<?php
$initdir = __DIR__;
$sessions = ($initdir."/sessions");
-chdir($initdir);
var_dump(rmdir($sessions));
+?>
--EXPECTF--
*** Testing session_save_path() : variation ***
bool(true)
diff --git a/ext/session/tests/session_save_path_variation5.phpt b/ext/session/tests/session_save_path_variation5.phpt
index b97badf7f6..7a8907e6dd 100644
--- a/ext/session/tests/session_save_path_variation5.phpt
+++ b/ext/session/tests/session_save_path_variation5.phpt
@@ -40,9 +40,11 @@ echo "Done";
ob_end_flush();
?>
--CLEAN--
+<?php
$directory = __DIR__;
$sessions = ($directory."/sessions");
var_dump(rmdir($sessions));
+?>
--EXPECTF--
*** Testing session_save_path() : variation ***
bool(true)
diff --git a/ext/standard/tests/array/end_64bit.phpt b/ext/standard/tests/array/end_64bit.phpt
index ba20693d0f..26c74120a8 100644
--- a/ext/standard/tests/array/end_64bit.phpt
+++ b/ext/standard/tests/array/end_64bit.phpt
@@ -109,10 +109,6 @@ var_dump( current($resources) );
echo "Done\n";
?>
---CLEAN--
-/* cleaning resource handles */
-fclose( $file_handle ); //file resource handle deleted
-closedir( $dir_handle ); //dir resource handle deleted
--EXPECTF--
*** Testing end() on different arrays ***
-- Iteration 1 --
diff --git a/ext/standard/tests/streams/proc_open_bug60120.phpt b/ext/standard/tests/streams/proc_open_bug60120.phpt
index 9cce5a4c94..4e5190c861 100644
--- a/ext/standard/tests/streams/proc_open_bug60120.phpt
+++ b/ext/standard/tests/streams/proc_open_bug60120.phpt
@@ -88,10 +88,13 @@ var_dump(
fclose($pipes[1]);
fclose($pipes[2]);
?>
+--CLEAN--
+<?php
+$file = preg_replace("~\.clean\.php$~", ".io.php", __FILE__);
+unlink($file);
+?>
--EXPECTF--
string(10000) "%s"
string(10000) "%s"
string(0) ""
string(0) ""
---CLEAN--
-unlink($file);