You are here

public function ParserTest::testPhpConstantTagMappingKey in Lockr 7.3

File

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

Class

ParserTest

Namespace

Symfony\Component\Yaml\Tests

Code

public function testPhpConstantTagMappingKey() {
  $yaml = <<<YAML
transitions:
    !php/const 'Symfony\\Component\\Yaml\\Tests\\B::FOO':
        from:
            - !php/const 'Symfony\\Component\\Yaml\\Tests\\B::BAR'
        to: !php/const 'Symfony\\Component\\Yaml\\Tests\\B::BAZ'
YAML;
  $expected = [
    'transitions' => [
      'foo' => [
        'from' => [
          'bar',
        ],
        'to' => 'baz',
      ],
    ],
  ];
  $this
    ->assertSame($expected, $this->parser
    ->parse($yaml, Yaml::PARSE_CONSTANT));
}