improve un/serialization API
[awesomized/ext-ion] / tests / Decimal / __construct.phpt
1 --TEST--
2 ion\Decimal::__construct
3 --EXTENSIONS--
4 ion
5 --FILE--
6 TEST
7 <?php
8 use ion\Decimal;
9
10 try {
11 new Decimal();
12 } catch (Error $e) {
13 echo $e->getMessage(), "\n";
14 }
15 new Decimal(1);
16 new Decimal("123");
17 new Decimal(123.123);
18 new Decimal("123.123");
19 new Decimal(1, null);
20 new Decimal(1, new Decimal\Context);
21 ?>
22 DONE
23 --EXPECTF--
24 TEST
25 ion\Decimal::__construct() expects at least 1 argument, 0 given
26
27 Deprecated: Implicit conversion from float 123.123 to int loses precision in %s/Decimal/__construct.php on line %d
28 DONE