diff options
author | Remi Collet <remi@remirepo.net> | 2021-01-18 08:33:29 +0100 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2021-01-18 08:33:29 +0100 |
commit | c1ee665cac66f54893b42193f16b572503762653 (patch) | |
tree | 4cad64f4094a9c1e2a82c03213a6149f41a84845 /trader-tests.patch | |
parent | daf394df444bf1a876ec5909fe6040ddfba70141 (diff) |
update to 0.5.1
Diffstat (limited to 'trader-tests.patch')
-rw-r--r-- | trader-tests.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/trader-tests.patch b/trader-tests.patch new file mode 100644 index 0000000..c774f13 --- /dev/null +++ b/trader-tests.patch @@ -0,0 +1,43 @@ +--- pecl/trader/trunk/tests/trader_bbands_01.phpt 2021/01/17 21:07:36 352308 ++++ pecl/trader/trunk/tests/trader_bbands_01.phpt 2021/01/18 07:21:15 352309 +@@ -3,6 +3,8 @@ + --SKIPIF-- + <?php + if (!extension_loaded("trader")) die("skip"); ++if (PHP_VERSION_ID >= 80000) die ("skip PHP 7 only"); ++?> + --INI-- + trader.real_precision=3 + --FILE-- +@@ -1464,4 +1466,4 @@ + [251]=> + float(2.6519196935811E+37) + } +-} +\ No newline at end of file ++} +--- pecl/trader/trunk/tests/trader_ini_01.phpt 2021/01/17 21:07:36 352308 ++++ pecl/trader/trunk/tests/trader_ini_01.phpt 2021/01/18 07:21:15 352309 +@@ -35,7 +35,12 @@ + ini_set('trader.real_round_mode', 'schnitzel'); + var_dump(ini_get('trader.real_round_mode')); + +-ini_set('trader.real_round_mode', array()); ++try { ++ // Hide warning for PHP 7 ++ @ini_set('trader.real_round_mode', array()); ++} catch (TypeError $e) { ++ // Hide exception for PHP 8 ++} + var_dump(ini_get('trader.real_round_mode')); + + ini_set('trader.real_round_mode', 42); +@@ -55,8 +60,6 @@ + + Warning: ini_set(): Invalid value 'schnitzel' for trader.real_round_mode in %strader_ini_01.php on line %d + string(8) "half_odd" +- +-Warning: ini_set() expects parameter 2 to be string, array given in %strader_ini_01.php on line %d + string(8) "half_odd" + + Warning: ini_set(): Invalid value '42' for trader.real_round_mode in %strader_ini_01.php on line %d |