You are here

public function ParserTest::testDeprecatedPhpConstantTagMappingKey in Lockr 7.3

@group legacy @expectedDeprecation The !php/const: tag to indicate dumped PHP constants is deprecated since Symfony 3.4 and will be removed in 4.0. Use the !php/const (without the colon) tag instead on line 2. @expectedDeprecation The !php/const: tag to indicate dumped PHP constants is deprecated since Symfony 3.4 and will be removed in 4.0. Use the !php/const (without the colon) tag instead on line 4. @expectedDeprecation The !php/const: tag to indicate dumped PHP constants is deprecated since Symfony 3.4 and will be removed in 4.0. Use the !php/const (without the colon) tag instead on line 5.

File

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

Class

ParserTest

Namespace

Symfony\Component\Yaml\Tests

Code

public function testDeprecatedPhpConstantTagMappingKey() {
  $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));
}