Skip to content

Commit 0b04b93

Browse files
committed
Enclose contents of CLEAN sections in PHP tags
We also place the CLEAN sections before EXPECT(F), and remove extraneous clean-ups.
1 parent 5a6373f commit 0b04b93

File tree

6 files changed

+15
-9
lines changed

6 files changed

+15
-9
lines changed

ext/openssl/tests/bug76296.phpt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@ ini_set('open_basedir', $dir);
1414

1515
var_dump(openssl_pkey_get_public($pem));
1616
?>
17+
--CLEAN--
18+
<?php
19+
@rmdir(__DIR__ . '/bug76296_openbasedir');
20+
?>
1721
--EXPECTF--
1822
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
1923
bool(false)
20-
--CLEAN--
21-
@rmdir(__DIR__ . '/bug76296_openbasedir');

ext/phar/tests/bug66960.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@ var_dump(file_exists("phar://$file/". str_repeat('a', PHP_MAXPATHLEN+1)));
1515
echo 'done';
1616
?>
1717
--CLEAN--
18+
<?php
1819
$file = __DIR__ . DIRECTORY_SEPARATOR . 'bug66960.phar';
1920
unlink($file);
21+
?>
2022
--EXPECT--
2123
bool(false)
2224
bool(false)

ext/session/tests/session_save_path_variation4.phpt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,11 @@ echo "Done";
4242
ob_end_flush();
4343
?>
4444
--CLEAN--
45+
<?php
4546
$initdir = __DIR__;
4647
$sessions = ($initdir."/sessions");
47-
chdir($initdir);
4848
var_dump(rmdir($sessions));
49+
?>
4950
--EXPECTF--
5051
*** Testing session_save_path() : variation ***
5152
bool(true)

ext/session/tests/session_save_path_variation5.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,11 @@ echo "Done";
4040
ob_end_flush();
4141
?>
4242
--CLEAN--
43+
<?php
4344
$directory = __DIR__;
4445
$sessions = ($directory."/sessions");
4546
var_dump(rmdir($sessions));
47+
?>
4648
--EXPECTF--
4749
*** Testing session_save_path() : variation ***
4850
bool(true)

ext/standard/tests/array/end_64bit.phpt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,6 @@ var_dump( current($resources) );
109109
echo "Done\n";
110110

111111
?>
112-
--CLEAN--
113-
/* cleaning resource handles */
114-
fclose( $file_handle ); //file resource handle deleted
115-
closedir( $dir_handle ); //dir resource handle deleted
116112
--EXPECTF--
117113
*** Testing end() on different arrays ***
118114
-- Iteration 1 --

ext/standard/tests/streams/proc_open_bug60120.phpt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,13 @@ var_dump(
8888
fclose($pipes[1]);
8989
fclose($pipes[2]);
9090
?>
91+
--CLEAN--
92+
<?php
93+
$file = preg_replace("~\.clean\.php$~", ".io.php", __FILE__);
94+
unlink($file);
95+
?>
9196
--EXPECTF--
9297
string(10000) "%s"
9398
string(10000) "%s"
9499
string(0) ""
95100
string(0) ""
96-
--CLEAN--
97-
unlink($file);

0 commit comments

Comments
 (0)