You are here

public function ParserTest::testBooleanKeys in Lockr 7.3

@group legacy @expectedDeprecation Implicit casting of non-string key to string is deprecated since Symfony 3.3 and will throw \Symfony\Component\Yaml\Exception\ParseException in 4.0. Quote your evaluable mapping keys instead on line 1.

File

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

Class

ParserTest

Namespace

Symfony\Component\Yaml\Tests

Code

public function testBooleanKeys() {
  $yaml = <<<'EOF'
true: foo
false: bar
EOF;
  $expected = [
    1 => 'foo',
    0 => 'bar',
  ];
  $this
    ->assertEquals($expected, $this->parser
    ->parse($yaml));
}