projects
/
awesomized
/
ext-ion
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
history
|
raw
|
HEAD
tests++
[awesomized/ext-ion]
/
tests
/
Reader
/
Stream.phpt
1
--TEST--
2
ion\Reader\Stream
3
--EXTENSIONS--
4
ion
5
--FILE--
6
TEST
7
<?php
8
$s = fopen("php://memory", "r+");
9
var_dump(fwrite($s, "123d0"));
10
rewind($s);
11
$r = new ion\Reader\Stream\Reader($s);
12
$r->next();
13
var_dump($r->readDecimal());
14
?>
15
DONE
16
--EXPECTF--
17
TEST
18
int(5)
19
object(ion\Decimal)#2 (2) {
20
["number"]=>
21
int(123)
22
["context"]=>
23
object(ion\Decimal\Context)#3 (5) {
24
["digits"]=>
25
int(999999999)
26
["eMax"]=>
27
int(999999999)
28
["eMin"]=>
29
int(-999999999)
30
["round"]=>
31
int(3)
32
["clamp"]=>
33
bool(false)
34
}
35
}
36
DONE