Skip to content

Commit fbe1932

Browse files
committed
Fixed tests
1 parent 2de67e6 commit fbe1932

File tree

5 files changed

+7
-15
lines changed

5 files changed

+7
-15
lines changed

ext/imap/tests/bug63126.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ extension_loaded('imap') or die('skip imap extension not available in this build
66

77
require_once(__DIR__.'/imap_include.inc');
88

9-
$in = imap_open($default_mailbox, $username, $password, OP_HALFOPEN, 1);
9+
$in = @imap_open($default_mailbox, $username, $password, OP_HALFOPEN, 1);
1010
if (!$in) {
1111
die("skip could not connect to mailbox $default_mailbox");
1212
}

ext/imap/tests/bug75774.phpt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ extension_loaded('imap') or die('skip imap extension not available in this build
1010
$fn = __DIR__ . DIRECTORY_SEPARATOR . "foo75774";
1111
$var1=fopen($fn, "w");
1212

13-
imap_append($var1, "", "", "", "");
13+
try {
14+
imap_append($var1, "", "", "", "");
15+
} catch (Throwable $e) {
16+
echo "\nException: " . $e->getMessage() . "\n";
17+
}
1418

1519
fclose($var1);
1620
unlink($fn);
@@ -20,5 +24,5 @@ unlink($fn);
2024
--EXPECTF--
2125
Warning: imap_append(): internal date not correctly formatted in %s on line %d
2226

23-
Warning: imap_append(): supplied resource is not a valid imap resource in %s on line %d
27+
Exception: imap_append(): supplied resource is not a valid imap resource
2428
==DONE==

ext/imap/tests/imap_mutf7_to_utf8.phpt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,12 @@ imap_mutf7_to_utf8
88

99
var_dump(imap_mutf7_to_utf8(""));
1010
var_dump(imap_mutf7_to_utf8(1));
11-
var_dump(imap_mutf7_to_utf8(array(1,2)));
1211
var_dump(imap_mutf7_to_utf8("t&AOQ-st"));
1312

1413
echo "Done\n";
1514
?>
1615
--EXPECTF--
1716
string(0) ""
1817
string(1) "1"
19-
20-
Warning: imap_mutf7_to_utf8() expects parameter 1 to be string, array given in %s on line %d
21-
NULL
2218
string(5) "täst"
2319
Done

ext/imap/tests/imap_utf8.phpt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,12 @@ imap_utf8() tests
77

88
var_dump(imap_utf8(""));
99
var_dump(imap_utf8(1));
10-
var_dump(imap_utf8(array(1,2)));
1110
var_dump(imap_utf8("test"));
1211

1312
echo "Done\n";
1413
?>
1514
--EXPECTF--
1615
string(0) ""
1716
string(1) "1"
18-
19-
Warning: imap_utf8() expects parameter 1 to be string, array given in %s on line %d
20-
NULL
2117
string(4) "%s"
2218
Done

ext/imap/tests/imap_utf8_to_mutf7_basic.phpt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,12 @@ imap_utf8_to_mutf7
88

99
var_dump(imap_utf8_to_mutf7(""));
1010
var_dump(imap_utf8_to_mutf7(1));
11-
var_dump(imap_utf8_to_mutf7(array(1,2)));
1211
var_dump(imap_utf8_to_mutf7("täst"));
1312

1413
echo "Done\n";
1514
?>
1615
--EXPECTF--
1716
string(0) ""
1817
string(1) "1"
19-
20-
Warning: imap_utf8_to_mutf7() expects parameter 1 to be string, array given in %s on line %d
21-
NULL
2218
string(8) "t&AOQ-st"
2319
Done

0 commit comments

Comments
 (0)