You are here

public function ParserTest::testDeprecatedPhpConstantTagMappingKey in Database Sanitize 7

@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 = array(
    'transitions' => array(
      'foo' => array(
        'from' => array(
          'bar',
        ),
        'to' => 'baz',
      ),
    ),
  );
  $this
    ->assertSame($expected, $this->parser
    ->parse($yaml, Yaml::PARSE_CONSTANT));
}