You are here

public function ParserTest::testParseReferencesOnMergeKeys in Loft Data Grids 7.2

File

vendor/symfony/yaml/Tests/ParserTest.php, line 1256

Class

ParserTest

Namespace

Symfony\Component\Yaml\Tests

Code

public function testParseReferencesOnMergeKeys() {
  $yaml = <<<YAML
mergekeyrefdef:
    a: foo
    <<: &quux
        b: bar
        c: baz
mergekeyderef:
    d: quux
    <<: *quux
YAML;
  $expected = array(
    'mergekeyrefdef' => array(
      'a' => 'foo',
      'b' => 'bar',
      'c' => 'baz',
    ),
    'mergekeyderef' => array(
      'd' => 'quux',
      'b' => 'bar',
      'c' => 'baz',
    ),
  );
  $this
    ->assertSame($expected, $this->parser
    ->parse($yaml));
}