public function ParserTest::testPhpConstantTagMappingKeyWithKeysCastToStrings in Database Sanitize 7
@group legacy @expectedDeprecation Using the Yaml::PARSE_KEYS_AS_STRINGS flag is deprecated since Symfony 3.4 as it will be removed in 4.0. Quote your keys when they are evaluable instead.
File
- vendor/
symfony/ yaml/ Tests/ ParserTest.php, line 2011
Class
Namespace
Symfony\Component\Yaml\TestsCode
public function testPhpConstantTagMappingKeyWithKeysCastToStrings() {
$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 | Yaml::PARSE_KEYS_AS_STRINGS));
}