Skip to content

Commit ee80c49

Browse files
committed
Fix all but one tests
1 parent d755874 commit ee80c49

File tree

8 files changed

+10
-10
lines changed

8 files changed

+10
-10
lines changed

ext/reflection/tests/ReflectionExtension_getClassNames_basic.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ array(5) {
1414
[1]=>
1515
string(14) "AssertionError"
1616
[2]=>
17-
string(7) "Process"
17+
string(16) "Standard\Process"
1818
[3]=>
1919
string(15) "php_user_filter"
2020
[4]=>

ext/standard/proc_open.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1452,8 +1452,7 @@ PHP_FUNCTION(proc_open)
14521452
}
14531453
}
14541454

1455-
if (1) {
1456-
} else {
1455+
if (0) {
14571456
exit_fail:
14581457
_php_free_envp(env);
14591458
RETVAL_FALSE;

ext/standard/tests/file/bug72035.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ $cmd = "$cgi -n -C $fl";
2222
/* Need to run CGI with the env reset. */
2323
$desc = array(0 => array("pipe", "r"));
2424
$proc = proc_open($cmd, $desc, $pipes, getcwd(), array());
25-
if (is_resource($proc)) {
25+
if ($proc) {
2626
echo stream_get_contents($pipes[0]);
2727

2828
proc_close($proc);

ext/standard/tests/general_functions/proc_close_closed.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Test that proc_close() does not accept a closed Process
44
<?php
55

66
$pipe = null;
7-
$process = proc_open('echo "foo";', [], $pipe);
7+
$process = proc_open('echo foo', [], $pipe);
88
proc_close($process);
99

1010
try {

ext/standard/tests/general_functions/proc_get_status_closed.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Test that proc_get_status() does not accept a closed Process
44
<?php
55

66
$pipe = null;
7-
$process = proc_open('echo "foo";', [], $pipe);
7+
$process = proc_open('echo foo', [], $pipe);
88
proc_close($process);
99

1010
try {

ext/standard/tests/general_functions/proc_terminate_closed.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Test that proc_terminate() does not accept a closed Process
44
<?php
55

66
$pipes = null;
7-
$process = proc_open('echo "foo";', [], $pipes);
7+
$process = proc_open('echo foo', [], $pipes);
88
proc_close($process);
99

1010
try {

ext/standard/tests/streams/bug78883.phpt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ $descriptorspec = array(
1515
$pipes = [];
1616
$cmd = 'cmd.exe "/c START ^"^" /WAIT ' . getenv('TEST_PHP_EXECUTABLE_ESCAPED') . ' -r ^"var_dump(fgets(STDIN));"';
1717
$proc = proc_open($cmd, $descriptorspec, $pipes);
18-
var_dump($proc instanceof Process);
18+
var_dump($proc);
1919
$pid = proc_get_status($proc)['pid'];
2020
sleep(3);
2121
$bug_is_present = !proc_get_status($proc)['running'];
@@ -30,5 +30,6 @@ proc_close($proc);
3030
var_dump($bug_is_present);
3131
?>
3232
--EXPECT--
33-
bool(true)
33+
object(Standard\Process)#1 (0) {
34+
}
3435
bool(false)

sapi/cli/tests/sapi_windows_set_ctrl_handler.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ if ($is_child) {
2929

3030
$proc = proc_open($cmd, $spec, $pipes, NULL, NULL, ["bypass_shell" => true, "create_process_group" => true]);
3131

32-
if (!is_resource($proc)) {
32+
if (!$proc) {
3333
die("Failed to start child. ");
3434
}
3535

0 commit comments

Comments
 (0)