]> granicus.if.org Git - php/commitdiff
Use EXPECT when possible
authorGabriel Caruso <carusogabriel34@gmail.com>
Mon, 11 Mar 2019 03:05:44 +0000 (00:05 -0300)
committerGabriel Caruso <carusogabriel34@gmail.com>
Mon, 11 Mar 2019 03:05:44 +0000 (00:05 -0300)
EXPECTF logic in run-tests.php is considerable, so let's avoid it.

20 files changed:
Zend/tests/runtime_compile_time_binary_operands.phpt
Zend/tests/type_declarations/typed_properties_047.phpt
ext/date/tests/bug77097.phpt
ext/date/tests/date_time_immutable001.phpt
ext/exif/tests/bug77184/bug77184.phpt
ext/exif/tests/bug77540.phpt
ext/mysqli/tests/bug76386.phpt
ext/openssl/tests/openssl_pkey_derive-dh.phpt
ext/openssl/tests/openssl_pkey_derive-ecdh.phpt
ext/openssl/tests/openssl_random_pseudo_bytes_error.phpt
ext/pdo_mysql/tests/pdo_mysql_local_infile_default_off.phpt
ext/pdo_mysql/tests/pdo_mysql_local_infile_set_on.phpt
ext/pgsql/tests/bug76548.phpt
ext/reflection/tests/bug74454.phpt
ext/soap/tests/bug48557.phpt
ext/sqlite3/tests/bug77051.phpt
ext/sqlite3/tests/sqlite3stmt_getsql.phpt
ext/standard/tests/strings/strip_tags_variation2.phpt
ext/xsl/tests/xsltprocessor_getParameter.phpt
tests/classes/constants_visibility_008.phpt

index 31366cd9e491f787e6e7b113271ba46085d83209..7caec412bc88f6ebb5d65a92911802a6a9916919 100644 (file)
@@ -151,6 +151,6 @@ if($c === 0) {
 $fl = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'compare_binary_operands_temp.php';
 @unlink($fl);
 ?>
---EXPECTF--
+--EXPECT--
 Failed: 0
 ===DONE===
index 7f1e573cd3a13977800e2d2b7581e6768359be6c..0b48cd1cd4554fcc7192cbd0fdca53f15e89d433 100644 (file)
@@ -28,7 +28,7 @@ try {
        echo $e->getMessage()."\n";
 }
 ?>
---EXPECTF--
+--EXPECT--
 object(Foo)#1 (1) {
   ["foo"]=>
   NULL
index effaad49007f9a4ae2e6e630863758982a49805b..080982d68169d551a8ed9a544a077564bd115ba9 100644 (file)
@@ -17,7 +17,7 @@ var_dump($diff->invert, $diff->s, $diff->f);
 $diff = $ago->diff($now, true);
 var_dump($diff->invert, $diff->s, $diff->f);
 ?>
---EXPECTF--
+--EXPECT--
 int(1)
 int(0)
 float(0.781751)
index d6ac1d33afb9d61fb291942047d29c1332a320c0..14eb2a986cd7b1301b02415aeec381041d3f40e9 100644 (file)
@@ -6,5 +6,5 @@ Mark Niebergall mbniebergall@gmail.com UPHPU TestFest 2017
 <?php
 var_dump(date_create_immutable('Invalid'));
 ?>
---EXPECTF--
+--EXPECT--
 bool(false)
index bbe7c93b614b68667b70ee6bd6078029cc65a2c5..e118d2f6775085219b60680804fe7d255498a022 100644 (file)
@@ -13,7 +13,7 @@ echo $tags['GPSLatitude'][2], PHP_EOL;
 echo $tags['GPSLongitude'][2], PHP_EOL;
 ?>
 ===DONE===
---EXPECTF--
+--EXPECT--
 156691934/70000000
 2672193571/70000000
 ===DONE===
index a284e1f263101e8455f6bfa2bec94ed684e04fc5..26e64db658c33ac49d58303497f83beae67c4ec2 100644 (file)
@@ -10,7 +10,7 @@ echo "Width ".$width."\n";
 echo "Height ".$height."\n";
 ?>
 DONE
---EXPECTF--
+--EXPECT--
 Width 0
 Height 0
 DONE
\ No newline at end of file
index 4182c651b7a268032d0e98fc54ec21d6545905b0..2f5ded1de474c802e3bafbc8c11feac3e20aa0e0 100644 (file)
@@ -78,7 +78,7 @@ if ($stmt) {
 }
 $link->close();
 ?>
---EXPECTF--
+--EXPECT--
 string(19) "2018-01-01 11:22:33"
 string(22) "2018-02-02 11:22:33.77"
 string(22) "2018-01-01 03:04:05.06"
index 5d65afbed4300e530941c38e80cb7f4f18730cc2..f5d615e9a8d4a356e05f7e27517955310acdf535 100644 (file)
@@ -40,5 +40,5 @@ dtlkbGbtoDOnxeNnN93gwQZngGYZYciu
 echo bin2hex(openssl_pkey_derive($pub,$priv));
 echo "\n";
 ?>
---EXPECTF--
+--EXPECT--
 10aed66ad96a65f50543aa9adbc18ea169bf98521c682c49fb8b7daeb9e8fbe6b9a800199ffe1123cc36fc358829cbbc5d21bf1eb8ce3cf644538b357f478361a284c27fbe31fc94d431562786dd7314613cd70e6d76ca1ab3c1f31556ed07162f243dcc1a43ea98c454fb6e891eaec7a14158d54cd33d3fbbbc75f1ea8ff5deaab25d5deb657c7c43004252df301b195207d01614e7cb833e0e8d785ba2ecfe16ad7a9634784fdb8db8afe049476b58743575725ee99c761a59a7d7b9e709fff84c8d427e2bc07953a7c2408eb3f8f7e0ebc2f901c6889955874ae79a3de19921757d69424145a35dbe5af778b080dada55bdfce8fb0319f2de39110f58e05d
index 387992423ef446d81e3fb7b1f591a33bcda683e3..701c51d861abe36dbff4d92ff646f45804b7a92e 100644 (file)
@@ -25,5 +25,5 @@ N2IRPU2MF6S0S6i44MU=
 echo bin2hex(openssl_pkey_derive($pub,$priv));
 echo "\n";
 ?>
---EXPECTF--
+--EXPECT--
 01171967cc0ddc553b46c6a821502aaea44aa04e6933d897ea11222efa0556f2d5d972816676c9ccf4e2430a26e07193ad39373050f6e54e4059f17720d7dd667635
index 2fb0ca6ed8c1dfb09aef540481d4a440c3c44d23..ee3f1d032cd48162a7de46c69fc1bea7694a3aff 100644 (file)
@@ -10,5 +10,5 @@ try {
     echo $e->getMessage().PHP_EOL;
 }
 ?>
---EXPECTF--
+--EXPECT--
 Length must be greater than 0
index 5a0b5f67e057380efc6529d8c7c35e519a0c6f05..a47bbbed3176ca909bc985b65551dc467487620d 100644 (file)
@@ -21,6 +21,6 @@ $db = new PDO($dsn, $user, $pass);
 echo var_export($db->getAttribute(PDO::MYSQL_ATTR_LOCAL_INFILE)), "\n";
 echo "done!\n";
 ?>
---EXPECTF--
+--EXPECT--
 false
 done!
index 4394bc0576a0492760553faa6c4f61299ea63d70..3b942a4d2eb073e67e02b6c1891912d441f6e198 100644 (file)
@@ -21,6 +21,6 @@ $db = new PDO($dsn, $user, $pass, array(PDO::MYSQL_ATTR_LOCAL_INFILE => true));
 echo var_export($db->getAttribute(PDO::MYSQL_ATTR_LOCAL_INFILE)), "\n";
 echo "done!\n";
 ?>
---EXPECTF--
+--EXPECT--
 true
 done!
index 3a0b8922e1ba0d4f948ca44346da3c0f441dc950..00940dcec0e7814d4f421916fed6b6569d412496 100644 (file)
@@ -16,7 +16,7 @@ while ($value = pg_fetch_result($result, 0)) {
 
 ?>
 ==DONE==
---EXPECTF--
+--EXPECT--
 string(1) "1"
 string(1) "2"
 string(1) "3"
index d2d6e886496fe5f5aaa5e1caff145d1ed88651b7..9e0332d89388fb1e877051c518e0d2c0da5f5f18 100644 (file)
@@ -14,6 +14,6 @@ function load_file() {
 }
 ?>
 ===DONE===
---EXPECTF--
+--EXPECT--
 ParseError: syntax error, unexpected 'if' (T_IF), expecting function (T_FUNCTION) or const (T_CONST)
 ===DONE===
index f9a68304b886b392c2db492707a64815d0aec46c..44a2b74b8ec22c3124366af8af879c2d904db495 100644 (file)
@@ -54,7 +54,7 @@ $y->handle($request);
 
 ?>
 ===DONE===
---EXPECTF--
+--EXPECT--
 array(6) {
   [1]=>
   int(123)
index 98e45ae88a2bf57a426e26f660033d9bf14bbf72..10c51fe7f1fa8536d5b085a411c06476dd04ec4e 100644 (file)
@@ -43,7 +43,7 @@ echo "Statement result\n";
 var_dump($res->fetchArray(SQLITE3_NUM));
 
 ?>
---EXPECTF--
+--EXPECT--
 Execute statement
 object(SQLite3Result)#3 (0) {
 }
index ef9e76b519669c0a24f293877dee9498491715e4..76618de3b0579a27013ef7901cbfa523652f678f 100644 (file)
@@ -29,7 +29,7 @@ var_dump($db->close());
 
 echo "Done\n";
 ?>
---EXPECTF--
+--EXPECT--
 Getting non-expanded SQL statement
 string(17) "SELECT :a, :b, ?;"
 Execute statement
index c30f29dc3f525cc62933d605c236ee8848134c2c..ee7d5c6cbc5c48e0868f8a6cfcb4dda5e18ccdcf 100644 (file)
@@ -85,7 +85,7 @@ foreach($values as $value) {
 
 echo "Done";
 ?>
---EXPECTF--
+--EXPECT--
 *** Testing strip_tags() : usage variations ***
 -- Iteration 1 --
 string(10) "helloworld"
index 8f2974ec0f70d3aaec124cfd9b5d4ec8639b83b7..b4031db9756c27437452684cd8317c9024cb598b 100644 (file)
@@ -12,7 +12,7 @@ include dirname(__FILE__) .'/prepare.inc';
 $proc->importStylesheet($xsl);
 $proc->setParameter('', 'key', 'value');
 var_dump($proc->getParameter('', 'key'));
---EXPECTF--
+--EXPECT--
 string(5) "value"
 --CREDITS--
 Christian Weiske, cweiske@php.net
index f24b70cf59ba99ff312c5c80dbbd52ff93c1c11c..fe1b0237f1a9926c7ecb5b25d83303fd25c51fb4 100644 (file)
@@ -8,5 +8,5 @@ class Foo
     private const BAR = 1;
 }
 echo (int)defined('Foo::BAR');
---EXPECTF--
+--EXPECT--
 0