You are here

public function ParserTest::testExplicitStringCasting in Lockr 7.3

File

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

Class

ParserTest

Namespace

Symfony\Component\Yaml\Tests

Code

public function testExplicitStringCasting() {
  $yaml = <<<'EOF'
'1.2': "bar"
!!str 1.3: "baz"

'true': foo
!!str false: bar

!!str null: 'null'
'~': 'null'
EOF;
  $expected = [
    '1.2' => 'bar',
    '1.3' => 'baz',
    'true' => 'foo',
    'false' => 'bar',
    'null' => 'null',
    '~' => 'null',
  ];
  $this
    ->assertEquals($expected, $this->parser
    ->parse($yaml));
}