Prefer EXPECT over EXPECTF

This commit is contained in:
Patrick Allaert 2021-06-29 15:34:26 +02:00 committed by Patrick Allaert
parent fa71a11fe2
commit ac18dd0dc7
48 changed files with 54 additions and 54 deletions

View File

@ -40,7 +40,7 @@ try {
echo $exception->getMessage() . "\n";
}
?>
--EXPECTF--
--EXPECT--
array(4) {
[0]=>
int(7)

View File

@ -10,7 +10,7 @@ var_dump($fiber->getReturn());
var_dump($fiber->isTerminated());
?>
--EXPECTF--
--EXPECT--
bool(false)
NULL
string(4) "test"

View File

@ -22,6 +22,6 @@ try {
echo "done\n";
?>
--EXPECTF--
--EXPECT--
Cannot suspend in a force-closed fiber
done

View File

@ -29,7 +29,7 @@ unset($fiber); // Destroy fiber object, executing finally block.
echo "done\n";
?>
--EXPECTF--
--EXPECT--
fiber
inner finally
outer finally

View File

@ -93,7 +93,7 @@ try {
}
?>
--EXPECTF--
--EXPECT--
3
3.10
2.00
@ -117,4 +117,4 @@ bccomp(): Argument #1 ($num1) is not well-formed
bccomp(): Argument #1 ($num1) is not well-formed
bccomp(): Argument #1 ($num1) is not well-formed
bccomp(): Argument #1 ($num1) is not well-formed
bccomp(): Argument #1 ($num1) is not well-formed
bccomp(): Argument #1 ($num1) is not well-formed

View File

@ -16,7 +16,7 @@ try {
echo $ex->getMessage(), PHP_EOL;
}
?>
--EXPECTF--
--EXPECT--
int(2170713600)
int(9223372036854720000)
jday must be between 2440588 and 106751993607888

View File

@ -19,6 +19,6 @@ try {
}
?>
--EXPECTF--
--EXPECT--
timezone_identifiers_list(): Argument #2 ($countryCode) must be a two-letter ISO 3166-1 compatible country code when argument #1 ($timezoneGroup) is DateTimeZone::PER_COUNTRY
timezone_identifiers_list(): Argument #2 ($countryCode) must be a two-letter ISO 3166-1 compatible country code when argument #1 ($timezoneGroup) is DateTimeZone::PER_COUNTRY

View File

@ -13,5 +13,5 @@ try {
echo $ex->getMessage(), PHP_EOL;
}
?>
--EXPECTF--
--EXPECT--
Hierarchy Request Error

View File

@ -9,5 +9,5 @@ $doc = new \DOMDocument();
$doc->loadXML('<a><!-- foo --></a>');
$doc->documentElement->firstChild->remove();
echo $doc->saveXML($doc->documentElement);
--EXPECTF--
--EXPECT--
<a/>

View File

@ -11,7 +11,7 @@ echo $tags['GPS']['GPSLatitude'][0] . PHP_EOL;
echo $tags['GPS']['GPSLongitude'][0] . PHP_EOL;
?>
===DONE===
--EXPECTF--
--EXPECT--
38/1
122/1
===DONE===

View File

@ -21,6 +21,6 @@ try {
echo $e->getMessage() . \PHP_EOL;
}
?>
--EXPECTF--
--EXPECT--
IntlCalendar::roll(): Argument #1 ($field) must be a valid field
intlcal_roll(): Argument #1 ($calendar) must be of type IntlCalendar, int given

View File

@ -33,5 +33,5 @@ ldap_delete($link, "cn=userref,$base", [['oid' => LDAP_CONTROL_MANAGEDSAIT, 'isc
ldap_delete($link, "cn=userref2,$base", [['oid' => LDAP_CONTROL_MANAGEDSAIT, 'iscritical' => TRUE]]);
remove_dummy_data($link, $base);
?>
--EXPECTF--
--EXPECT--
int(2)

View File

@ -44,7 +44,7 @@ var_dump(strpos(parseXML4($xml), 'SECRET_DATA') === false);
echo "Done\n";
?>
--EXPECTF--
--EXPECT--
bool(true)
bool(true)
bool(true)

View File

@ -55,6 +55,6 @@ if (!$link->query('DROP TABLE IF EXISTS test')) {
$link->close();
unlink('bug77956.data');
?>
--EXPECTF--
--EXPECT--
[006] [2000] LOAD DATA LOCAL INFILE is forbidden, check related settings like mysqli.allow_local_infile|mysqli.local_infile_directory or PDO::MYSQL_ATTR_LOCAL_INFILE|PDO::MYSQL_ATTR_LOCAL_INFILE_DIRECTORY
done
done

View File

@ -35,5 +35,5 @@ $mysqli->close();
<?php
require_once "clean_table.inc";
?>
--EXPECTF--
--EXPECT--
Commands out of sync; you can't run this command now

View File

@ -129,5 +129,5 @@ max_execution_time=240
mysqli_query($link, 'DROP USER pamtest');
mysqli_query($link, 'DROP USER pamtest@localhost');
?>
--EXPECTF--
--EXPECT--
done!

View File

@ -307,7 +307,7 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("clean_table.inc");
?>
--EXPECTF--
--EXPECT--
[005]
array(2) {
[0]=>

View File

@ -287,7 +287,7 @@ require_once('skipifconnectfailure.inc');
print "done!";
?>
--EXPECTF--
--EXPECT--
[005]
array(4) {
[0]=>

View File

@ -283,7 +283,7 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("clean_table.inc");
?>
--EXPECTF--
--EXPECT--
[005]
array(4) {
[0]=>

View File

@ -85,7 +85,7 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("clean_table.inc");
?>
--EXPECTF--
--EXPECT--
mysqli_stmt object is not fully initialized
int(3)
int(1)

View File

@ -49,7 +49,7 @@ oci8_test_sql_execute($c, $stmtarray);
echo "Done\n";
?>
--EXPECTF--
--EXPECT--
bool(true)
bool(false)
oci_define_by_name(): Argument #2 ($column) cannot be empty

View File

@ -71,7 +71,7 @@ $statement = oci_parse($c, $drop);
echo "Done\n";
?>
--EXPECTF--
--EXPECT--
OCILob::save(): Argument #2 ($offset) must be greater than or equal to 0
string(4) "data"

View File

@ -37,7 +37,7 @@ try {
}
?>
--EXPECTF--
--EXPECT--
Test 1: Import
OCILob::savefile(): Argument #1 ($filename) must not contain any null bytes
Test 2: Export

View File

@ -17,6 +17,6 @@ if ($pid == 0) {
exit;
}
?>
--EXPECTF--
--EXPECT--
*** Test with no flags ***
child

View File

@ -11,5 +11,5 @@ try {
var_dump(!empty($e->errorInfo) && is_array($e->errorInfo));
}
?>
--EXPECTF--
bool(true)
--EXPECT--
bool(true)

View File

@ -11,5 +11,5 @@ try {
var_dump(!empty($e->errorInfo) && is_array($e->errorInfo));
}
?>
--EXPECTF--
bool(true)
--EXPECT--
bool(true)

View File

@ -11,5 +11,5 @@ try {
var_dump(!empty($e->errorInfo) && is_array($e->errorInfo));
}
?>
--EXPECTF--
bool(true)
--EXPECT--
bool(true)

View File

@ -37,7 +37,7 @@ try {
print "Done!\n";
?>
--EXPECTF--
--EXPECT--
Session is not active
Session is not active
Session is not active

View File

@ -11,5 +11,5 @@ try {
print $e->getMessage();
}
?>
--EXPECTF--
SOAP-ERROR: Parsing WSDL: Unexpected WSDL element <>
--EXPECT--
SOAP-ERROR: Parsing WSDL: Unexpected WSDL element <>

View File

@ -24,7 +24,7 @@ $rounded_up_val = socket_get_option( $socket, SOL_TCP, TCP_DEFER_ACCEPT);
socket_close($socket);
var_dump($rounded_up_val > $initial_val); // Value rounded up by the kernel, might differ from kernel version/setting
?>
--EXPECTF--
--EXPECT--
*** Test with TCP_DEFER_ACCEPT with initial SYN/ACK 'timeout' value to rounded up one ***
bool(true)
bool(true)

View File

@ -15,7 +15,7 @@ try {
echo $exception->getMessage() . "\n";
}
?>
--EXPECTF--
--EXPECT--
socket_select(): At least one array argument must be passed
--CREDITS--
Till Klampaeckel, till@php.net

View File

@ -88,7 +88,7 @@ var_dump(count($arr, COUNT_RECURSIVE));
fclose( $resource1 );
closedir( $resource2 );
?>
--EXPECTF--
--EXPECT--
*** Testing basic functionality of count() function ***
-- Testing arrays --
COUNT_NORMAL: should be 2, is 2

View File

@ -79,7 +79,7 @@ $dirname = __DIR__."/symlink_link_linkinfo_is_link_basic1";
unlink("$dirname/symlink_link_linkinfo_is_link_basic1.tmp");
rmdir($dirname);
?>
--EXPECTF--
--EXPECT--
*** Testing symlink(), linkinfo(), link() and is_link() : basic functionality ***
-- Iteration 1 --

View File

@ -101,7 +101,7 @@ rmdir("$dirname/test/home");
rmdir("$dirname/test");
rmdir($dirname);
?>
--EXPECTF--
--EXPECT--
*** Testing symlink(), link(), linkinfo() and is_link() with linknames stored as members in an object ***
-- Working with soft links --

View File

@ -89,7 +89,7 @@ $filename = "$dirname/symlink_link_linkinfo_is_link_variation9.tmp";
unlink($filename);
rmdir($dirname);
?>
--EXPECTF--
--EXPECT--
*** Checking lstat() on soft link ***
bool(true)
linkinfo() returns integer !== -1: bool(true)

View File

@ -48,7 +48,7 @@ while ($pipes) {
}
?>
--EXPECTF--
--EXPECT--
bool(true)
bool(true)
PIPE 1 << hello

View File

@ -59,7 +59,7 @@ fclose($pipes[0]);
printf("STDOUT << %s\n", read_pipe($pipes[1]));
?>
--EXPECTF--
--EXPECT--
bool(true)
bool(true)
STDOUT << hello

View File

@ -48,7 +48,7 @@ fclose($pipes[0]);
printf("STDOUT << %s\n", read_pipe($pipes[1]));
?>
--EXPECTF--
--EXPECT--
bool(true)
STDOUT << hello
STDOUT << world

View File

@ -21,6 +21,6 @@ var_dump(stream_get_meta_data($stream)['wrapper_data'][1] === "Location: $url");
http_server_kill($pid);
?>
--EXPECTF--
--EXPECT--
string(4) "Body"
bool(true)

View File

@ -51,7 +51,7 @@ try {
}
?>
--EXPECTF--
--EXPECT--
64-bit format codes are not available for 32-bit versions of PHP
64-bit format codes are not available for 32-bit versions of PHP
64-bit format codes are not available for 32-bit versions of PHP

View File

@ -27,7 +27,7 @@ try {
}
?>
--EXPECTF--
--EXPECT--
Current Value of 'tidy-mark': bool(false)
Current Value of 'error-file': string(0) ""
Current Value of 'tab-size': int(8)

View File

@ -41,7 +41,7 @@ var_dump(file_get_contents($file));
echo "Done\n";
?>
--EXPECTF--
--EXPECT--
bool(true)
bool(true)
bool(true)

View File

@ -20,7 +20,7 @@ var_dump($value); // NULL
var_dump($fiber->getReturn()); // int(1)
?>
--EXPECTF--
--EXPECT--
int(123)
int(246)
NULL

View File

@ -16,7 +16,7 @@ var_dump($test->start()); // int(1)
var_dump($test->resume(2)); // NULL
?>
--EXPECTF--
--EXPECT--
int(1)
int(2)
NULL

View File

@ -29,7 +29,7 @@ var_dump($value); // NULL
var_dump($fiber->getReturn()); // int(-1)
?>
--EXPECTF--
--EXPECT--
int(1)
int(2)
int(3)

View File

@ -27,7 +27,7 @@ var_dump($value); // int(3)
$value = $test->resume(2 * $value);
?>
--EXPECTF--
--EXPECT--
int(1)
int(2)
int(3)

View File

@ -28,7 +28,7 @@ var_dump($test->resume('10')); // NULL
var_dump($fiber->resume('2')); // NULL
?>
--EXPECTF--
--EXPECT--
int(10)
int(1)
string(1) "1"

View File

@ -16,6 +16,6 @@ $fiber->pipeTo(function (int $result): void {
var_dump($fiber->start());
?>
--EXPECTF--
--EXPECT--
int(1)
NULL