update 1.0.8.0

Commits for version update
This commit is contained in:
Manish Verma
2016-10-17 12:02:27 +05:30
parent dec927987b
commit 76e85db070
9674 changed files with 495757 additions and 58922 deletions

View File

@@ -128,6 +128,45 @@ EOTXT
);
}
public function testJsonCast()
{
$var = (array) json_decode('{"0":{},"1":null}');
foreach ($var as &$v) {
}
$var[] = &$v;
$var[''] = 2;
$this->assertDumpMatchesFormat(
<<<EOTXT
array:4 [
"0" => {}
"1" => &1 null
0 => &1 null
"" => 2
]
EOTXT
,
$var
);
}
public function testObjectCast()
{
$var = (object) array(1 => 1);
$var->{1} = 2;
$this->assertDumpMatchesFormat(
<<<EOTXT
{
+1: 1
+"1": 2
}
EOTXT
,
$var
);
}
public function testClosedResource()
{
if (defined('HHVM_VERSION') && HHVM_VERSION_ID < 30600) {
@@ -195,7 +234,7 @@ EOTXT
$twig = <<<EOTXT
foo.twig:2: """
foo bar\\n
twig source\\n
twig source\\n
\\n
"""