Skip to content

Commit 0c6d06e

Browse files
committed
Replace EXPECTF when possible
Closes GH-5779
1 parent 24a8065 commit 0c6d06e

File tree

102 files changed

+106
-111
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+106
-111
lines changed

Zend/tests/attributes/004_name_resolution.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ namespace {
4040
dump_attributes((new ReflectionFunction('Foo\foo'))->getAttributes());
4141
}
4242
?>
43-
--EXPECTF--
43+
--EXPECT--
4444
array(5) {
4545
[0]=>
4646
array(2) {

Zend/tests/attributes/007_self_reflect_attribute.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ foreach ($attributes as $attribute) {
1414
var_dump(get_class($a));
1515
var_dump($a->flags == Attribute::TARGET_ALL);
1616
}
17-
--EXPECTF--
17+
--EXPECT--
1818
string(9) "Attribute"
1919
array(0) {
2020
}

ext/calendar/tests/jdtomonthname.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ foreach ($jd_days as $jd_day) {
2626
echo "Done\n";
2727

2828
?>
29-
--EXPECTF--
29+
--EXPECT--
3030
=== 2453396
3131
string(3) "Jan"
3232
string(7) "January"

ext/curl/tests/curl_copy_handle_variation4.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ curl_multi_remove_handle($mh, $ch3);
3737
curl_multi_close($mh);
3838
?>
3939
===DONE===
40-
--EXPECTF--
40+
--EXPECT--
4141
bool(true)
4242
АБВ.txt|application/octet-stream|5АБВ.txt|application/octet-stream|5===DONE===
4343
--CLEAN--

ext/curl/tests/curl_multi_close_basic001.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ var_dump($multi_close_result);
1313
var_dump($cmh);
1414
curl_multi_close($cmh);
1515
?>
16-
--EXPECTF--
16+
--EXPECT--
1717
object(CurlMultiHandle)#1 (0) {
1818
}
1919
NULL

ext/curl/tests/curl_multi_init_basic.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ var_dump($mh);
1818
curl_multi_close($mh);
1919
var_dump($mh);
2020
?>
21-
--EXPECTF--
21+
--EXPECT--
2222
*** Testing curl_multi_init(void); ***
2323
object(CurlMultiHandle)#1 (0) {
2424
}

ext/date/tests/bug52062.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ var_dump($d->getTimestamp());
2424
$i = new DateInterval('PT100000000000S');
2525
var_dump($i->format('%s'));
2626
?>
27-
--EXPECTF--
27+
--EXPECT--
2828
string(32) "5138-11-16 09:46:40 100000000000"
2929
bool(false)
3030
string(12) "100000000000"

ext/dba/tests/dba_handlers.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ foreach ($h as $key => $val) {
5050
<?php
5151
require(__DIR__ .'/clean.inc');
5252
?>
53-
--EXPECTF--
53+
--EXPECT--
5454
database handler: flatfile
5555
Test 1
5656
Success: flatfile enabled

ext/dba/tests/dba_optimize.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ if (($db_file=dba_open($db_filename, "n", $handler))!==FALSE) {
3434
<?php
3535
require(__DIR__ .'/clean.inc');
3636
?>
37-
--EXPECTF--
37+
--EXPECT--
3838
database handler: flatfile
3939
2YY
4040
bool(true)

ext/dba/tests/dba_split.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ var_dump(dba_key_split("[key1]name1[key2]name2"));
1919
var_dump(dba_key_split("[key1]name1"));
2020

2121
?>
22-
--EXPECTF--
22+
--EXPECT--
2323
array(2) {
2424
[0]=>
2525
string(0) ""

ext/dba/tests/dba_sync.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ if (($db_file=dba_open($db_filename, "n", $handler))!==FALSE) {
3434
<?php
3535
require(__DIR__ .'/clean.inc');
3636
?>
37-
--EXPECTF--
37+
--EXPECT--
3838
database handler: flatfile
3939
2YY
4040
bool(true)

ext/enchant/tests/invalidobj.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ if (is_object($broker)) {
2121
}
2222
echo "OK\n";
2323
?>
24-
--EXPECTF--
24+
--EXPECT--
2525
OK
2626
Invalid or uninitialized EnchantBroker object
2727
OK

ext/exif/tests/bug77753.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ Bug #77753 (Heap-buffer-overflow in php_ifd_get32s)
77
@var_dump(exif_read_data(__DIR__."/bug77753.tiff"));
88
?>
99
DONE
10-
--EXPECTF--
10+
--EXPECT--
1111
bool(false)
1212
DONE

ext/exif/tests/bug77988.phpt

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ Bug #77988 (heap-buffer-overflow on php_jpg_get16)
77
exif_read_data(__DIR__."/bug77988.jpg", 'COMMENT', FALSE, TRUE);
88
?>
99
DONE
10-
--EXPECTF--
11-
DONE
10+
--EXPECT--
11+
DONE

ext/exif/tests/bug78222.phpt

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ Bug #78222 (heap-buffer-overflow on exif_scan_thumbnail)
77
exif_read_data(__DIR__."/bug78222.jpg", 'THUMBNAIL', FALSE, TRUE);
88
?>
99
DONE
10-
--EXPECTF--
11-
DONE
10+
--EXPECT--
11+
DONE

ext/exif/tests/bug78256.phpt

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ Bug #78256 (heap-buffer-overflow on exif_process_user_comment)
77
@exif_read_data(__DIR__."/bug78256.jpg", 'COMMENT', FALSE, TRUE);
88
?>
99
DONE
10-
--EXPECTF--
11-
DONE
10+
--EXPECT--
11+
DONE

ext/exif/tests/duplicate_copyright_tag_leak.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ if (!extension_loaded('exif')) {
1414

1515
?>
1616
===DONE===
17-
--EXPECTF--
17+
--EXPECT--
1818
===DONE===

ext/ffi/tests/045.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ try {
2020
echo get_class($e) . ": " . $e->getMessage()."\n";
2121
}
2222
?>
23-
--EXPECTF--
23+
--EXPECT--
2424
bool(true)
2525
bool(false)
2626
TypeError: FFI::isNull(): Argument #1 ($ptr) must be of type FFI\CData, null given

ext/gd/tests/bug55005.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ trycatch_dump(
1616
fn () => imagepolygon($g, array(200,10, 200,100, 280,100), 2, $fgnd)
1717
);
1818
?>
19-
--EXPECTF--
19+
--EXPECT--
2020
!! [ValueError] imagefilledpolygon(): Argument #3 ($num_points_or_col) must be greater than or equal to 3
2121
!! [ValueError] imagepolygon(): Argument #3 ($num_points_or_col) must be greater than or equal to 3

ext/gd/tests/imagepng_nullbyte_injection.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ try {
1717
echo $e->getMessage(), "\n";
1818
}
1919
?>
20-
--EXPECTF--
20+
--EXPECT--
2121
imagepng(): Argument #2 ($to) must not contain null bytes

ext/gd/tests/imagexbm_nullbyte_injection.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ try {
1313
echo $e->getMessage(), "\n";
1414
}
1515
?>
16-
--EXPECTF--
16+
--EXPECT--
1717
imagexbm(): Argument #2 ($filename) must be a valid path or null, string given

ext/gd/tests/lines.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ if ($p3) {
100100

101101

102102
?>
103-
--EXPECTF--
103+
--EXPECT--
104104
Horizontal: ok
105105
Vertical: ok
106106
Diagonal: ok

ext/imap/tests/imap_binary_basic.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ $base64 = imap_binary($hex);
2929
var_dump(bin2hex($base64));
3030

3131
?>
32-
--EXPECTF--
32+
--EXPECT--
3333
*** Testing imap_binary() : basic functionality ***
3434
Encode as short string
3535
string(136) "5647687063794270637942686269426c654746746347786c49484e30636d6c755a794230627942695a53426959584e6c49445930494756755932396b0d0a5a57513d0d0a"

ext/imap/tests/imap_mutf7_to_utf8.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ var_dump(imap_mutf7_to_utf8("t&AOQ-st"));
1212

1313
echo "Done\n";
1414
?>
15-
--EXPECTF--
15+
--EXPECT--
1616
string(0) ""
1717
string(1) "1"
1818
string(5) "täst"

ext/imap/tests/imap_utf8_to_mutf7_basic.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ var_dump(imap_utf8_to_mutf7("täst"));
1212

1313
echo "Done\n";
1414
?>
15-
--EXPECTF--
15+
--EXPECT--
1616
string(0) ""
1717
string(1) "1"
1818
string(8) "t&AOQ-st"

ext/ldap/tests/ldap_explode_dn.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ var_dump(ldap_explode_dn("bob,dc=example,dc=com", 1));
3232
echo "Done\n";
3333

3434
?>
35-
--EXPECTF--
35+
--EXPECT--
3636
array(4) {
3737
["count"]=>
3838
int(3)

ext/mbstring/tests/mb_parse_str.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ foreach ($queries as $query) {
2323
test($query);
2424
}
2525
?>
26-
--EXPECTF--
26+
--EXPECT--
2727
array(2) {
2828
["foo"]=>
2929
string(3) "abc"

ext/mbstring/tests/mb_parse_str02.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ foreach ($queries as $query) {
2525
test($query);
2626
}
2727
?>
28-
--EXPECTF--
28+
--EXPECT--
2929
array(3) {
3030
["foo"]=>
3131
string(3) "abc"

ext/mbstring/tests/mb_stripos.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ $r = mb_stripos($euc_jp, "\n");
102102
($r === FALSE) ? print "OK_NEWLINE\n" : print "NG_NEWLINE\n";
103103

104104
?>
105-
--EXPECTF--
105+
--EXPECT--
106106
String len: 43
107107
== POSITIVE OFFSET ==
108108
10

ext/mysqli/tests/bug36420.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ try {
2929

3030
echo "Done\n";
3131
?>
32-
--EXPECTF--
32+
--EXPECT--
3333
mysqli_result object is already closed
3434
mysqli_result object is already closed
3535
Done

ext/mysqli/tests/bug63398.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ try {
2727

2828
echo "okey";
2929
?>
30-
--EXPECTF--
30+
--EXPECT--
3131
mysqli object is already closed
3232
okey

ext/mysqli/tests/mysqli_class_mysqli_result_interface.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ require_once('skipifconnectfailure.inc');
149149

150150
print "done!";
151151
?>
152-
--EXPECTF--
152+
--EXPECT--
153153
Parent class:
154154
bool(false)
155155

ext/mysqli/tests/mysqli_connect_attr.phpt

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,5 @@ mysqli_close($link);
7474

7575
printf("done!");
7676
?>
77-
--EXPECTF--
78-
done!
77+
--EXPECT--
78+
done!

ext/mysqli/tests/mysqli_enable_reads_from_master.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ if (!function_exists('mysqli_enable_reads_from_master')) {
4242

4343
print "done!";
4444
?>
45-
--EXPECTF--
45+
--EXPECT--
4646
mysqli object is already closed
4747
done!

ext/mysqli/tests/mysqli_free_result.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ require_once('skipifconnectfailure.inc');
5252
<?php
5353
require_once("clean_table.inc");
5454
?>
55-
--EXPECTF--
55+
--EXPECT--
5656
a
5757
NULL
5858
b

ext/mysqli/tests/mysqli_more_results.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ require_once('skipifconnectfailure.inc');
6262
<?php
6363
require_once("clean_table.inc");
6464
?>
65-
--EXPECTF--
65+
--EXPECT--
6666
[004]
6767
bool(false)
6868
[006]

ext/mysqli/tests/mysqli_multi_query.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ require_once('skipifconnectfailure.inc');
114114
<?php
115115
require_once("clean_table.inc");
116116
?>
117-
--EXPECTF--
117+
--EXPECT--
118118
[006] 3
119119
[008] 0
120120
[009] [2014] Commands out of sync; you can't run this command now

ext/mysqli/tests/mysqli_next_result.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,6 @@ require_once('skipifconnectfailure.inc');
6767
<?php
6868
require_once("clean_table.inc");
6969
?>
70-
--EXPECTF--
70+
--EXPECT--
7171
mysqli object is already closed
7272
done!

ext/mysqli/tests/mysqli_send_query.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,6 @@ if (!$TEST_EXPERIMENTAL)
4747
}
4848
print "done!";
4949
?>
50-
--EXPECTF--
50+
--EXPECT--
5151
mysqli object is already closed
5252
done!

ext/mysqli/tests/mysqli_stmt_get_result_metadata.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ if (!function_exists('mysqli_stmt_get_result'))
221221
<?php
222222
require_once("clean_table.inc");
223223
?>
224-
--EXPECTF--
224+
--EXPECT--
225225
array(2) {
226226
["id"]=>
227227
int(1)

ext/mysqli/tests/mysqli_stmt_param_count.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ require_once('skipifconnectfailure.inc');
5656
<?php
5757
require_once("clean_table.inc");
5858
?>
59-
--EXPECTF--
59+
--EXPECT--
6060
mysqli_stmt object is not fully initialized
6161
mysqli_stmt object is already closed
6262
done!

ext/mysqli/tests/mysqli_store_result.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@ require_once('skipifconnectfailure.inc');
5353
<?php
5454
require_once("clean_table.inc");
5555
?>
56-
--EXPECTF--
56+
--EXPECT--
5757
mysqli object is already closed
5858
done!

ext/mysqli/tests/mysqli_warning_count.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ require_once('skipifconnectfailure.inc');
3838
<?php
3939
require_once("clean_table.inc");
4040
?>
41-
--EXPECTF--
41+
--EXPECT--
4242
mysqli object is already closed
4343
done!

ext/oci8/tests/coll_018.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ echo "Done\n";
5252
require __DIR__."/drop_type.inc";
5353

5454
?>
55-
--EXPECTF--
55+
--EXPECT--
5656
Test 2.
5757
bool(true)
5858

ext/oci8/tests/existence_aliases.phpt

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ var_dump(function_exists('ocicollsize'));
5151
var_dump(function_exists('ocicollmax'));
5252
var_dump(function_exists('ocicolltrim'));
5353
?>
54-
--EXPECTF--
54+
--EXPECT--
55+
bool(true)
5556
bool(true)
5657
bool(true)
5758
bool(true)
@@ -97,4 +98,3 @@ bool(true)
9798
bool(true)
9899
bool(true)
99100
bool(true)
100-
bool(true)

0 commit comments

Comments
 (0)