EOF;
$this->
assertSame($expected,
$this->dumper->
dump($this->array, 4
), '->dump() takes an inline level argument'
);
$this->
assertSame($expected,
$this->dumper->
dump($this->array, 10
), '->dump() takes an inline level argument'
);
$this->
assertSameData($this->array,
$this->parser->
parse($expected));
} public function testObjectSupportEnabled() { $dump =
$this->dumper->
dump(['foo' =>
new A(), 'bar' => 1
], 0, 0, Yaml::DUMP_OBJECT
);
$this->
assertSame('{ foo: !php/object \'O:30:"Symfony\Component\Yaml\Tests\A":1:{s:1:"a";s:3:"foo";}\', bar: 1 }',
$dump, '->dump() is able to dump objects'
);
} public function testObjectSupportDisabledButNoExceptions() { $dump =
$this->dumper->
dump(['foo' =>
new A(), 'bar' => 1
]);
$this->
assertSame('{ foo: null, bar: 1 }',
$dump, '->dump() does not dump objects when disabled'
);
}