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

@@ -135,6 +135,72 @@ EOTXT;
$this->assertStringMatchesFormat($expected, print_r($clone, true));
}
public function testJsonCast()
{
$data = (array) json_decode('{"1":{}}');
$cloner = new VarCloner();
$clone = $cloner->cloneVar($data);
$expected = <<<'EOTXT'
object(Symfony\Component\VarDumper\Cloner\Data)#%i (4) {
["data":"Symfony\Component\VarDumper\Cloner\Data":private]=>
array(2) {
[0]=>
array(1) {
[0]=>
object(Symfony\Component\VarDumper\Cloner\Stub)#%i (7) {
["type"]=>
string(5) "array"
["class"]=>
string(5) "assoc"
["value"]=>
int(1)
["cut"]=>
int(0)
["handle"]=>
int(0)
["refCount"]=>
int(0)
["position"]=>
int(1)
}
}
[1]=>
array(1) {
["1"]=>
object(Symfony\Component\VarDumper\Cloner\Stub)#%i (7) {
["type"]=>
string(6) "object"
["class"]=>
string(8) "stdClass"
["value"]=>
NULL
["cut"]=>
int(0)
["handle"]=>
int(%i)
["refCount"]=>
int(0)
["position"]=>
int(0)
}
}
}
["maxDepth":"Symfony\Component\VarDumper\Cloner\Data":private]=>
int(20)
["maxItemsPerDepth":"Symfony\Component\VarDumper\Cloner\Data":private]=>
int(-1)
["useRefHandles":"Symfony\Component\VarDumper\Cloner\Data":private]=>
int(-1)
}
EOTXT;
ob_start();
var_dump($clone);
$this->assertStringMatchesFormat($expected, ob_get_clean());
}
public function testCaster()
{
$cloner = new VarCloner(array(