]> granicus.if.org Git - php/commitdiff
Enclose contents of CLEAN sections in PHP tags
authorChristoph M. Becker <cmbecker69@gmx.de>
Tue, 28 Apr 2020 15:42:52 +0000 (17:42 +0200)
committerChristoph M. Becker <cmbecker69@gmx.de>
Wed, 29 Apr 2020 07:07:53 +0000 (09:07 +0200)
We also place the CLEAN sections before EXPECT(F), and remove
extraneous clean-ups.

ext/openssl/tests/bug76296.phpt
ext/phar/tests/bug66960.phpt
ext/session/tests/session_save_path_variation4.phpt
ext/session/tests/session_save_path_variation5.phpt
ext/standard/tests/array/end_64bit.phpt
ext/standard/tests/streams/proc_open_bug60120.phpt

index 41e3b9984e02c3eb15b14aa057c657cf6f74c3ed..0ac583d13eb6f26244b2b1b62a4ecbcaade1df73 100644 (file)
@@ -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');
index 0d2ffa6df06b63cfcfbc3f66dc97ca192c0ecace..a2616c5e3ad491991100fc85f7d6d617a83d656d 100644 (file)
@@ -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)
index a95b990dbc7961979ab5d158132ce6f5b53ac5f7..c59a39ece340b20861bc713b938b908b2e20b24c 100644 (file)
@@ -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)
index b97badf7f6dcaea60246449049cebfc2f5fdad62..7a8907e6dd41f94097a698e2a1e1e376c633d12c 100644 (file)
@@ -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)
index ba20693d0f995abd989956edb37af347ee52b1cc..26c74120a8d833867738c92352aaab9586a2d24b 100644 (file)
@@ -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 --
index 9cce5a4c94f1a9b474f9d8e29cadf6d1d1888952..4e5190c861f303d4f887de5fc3c2bd614832895b 100644 (file)
@@ -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);