diff options
Diffstat (limited to 'ext/bcmath/tests/bcpow_error3.phpt')
-rw-r--r-- | ext/bcmath/tests/bcpow_error3.phpt | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/ext/bcmath/tests/bcpow_error3.phpt b/ext/bcmath/tests/bcpow_error3.phpt new file mode 100644 index 0000000000..f47c85d4da --- /dev/null +++ b/ext/bcmath/tests/bcpow_error3.phpt @@ -0,0 +1,23 @@ +--TEST-- +bcpow() requires well-formed values +--EXTENSIONS-- +bcmath +--FILE-- +<?php + +try { + bcpow('a', '1'); +} catch (\ValueError $e) { + echo $e->getMessage() . PHP_EOL; +} + +try { + bcpow('1', 'a'); +} catch (\ValueError $e) { + echo $e->getMessage() . PHP_EOL; +} + +?> +--EXPECT-- +bcpow(): Argument #1 ($num) is not well-formed +bcpow(): Argument #2 ($exponent) is not well-formed |