You are here

public function DumperTest::testDumpingArrayObjectInstancesWithNumericKeysInlined in Lockr 7.3

File

vendor/symfony/yaml/Tests/DumperTest.php, line 373

Class

DumperTest

Namespace

Symfony\Component\Yaml\Tests

Code

public function testDumpingArrayObjectInstancesWithNumericKeysInlined() {
  $deep = new \ArrayObject([
    'd',
    'e',
  ]);
  $inner = new \ArrayObject([
    'b',
    'c',
    $deep,
  ]);
  $outer = new \ArrayObject([
    'a',
    $inner,
  ]);
  $yaml = $this->dumper
    ->dump($outer, 0, 0, Yaml::DUMP_OBJECT_AS_MAP);
  $expected = <<<YAML
{ 0: a, 1: { 0: b, 1: c, 2: { 0: d, 1: e } } }
YAML;
  $this
    ->assertSame($expected, $yaml);
}