8000 [Yaml] add tests for specific mapping keys · symfony/symfony@5a6f4e3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5a6f4e3

Browse files
committed
[Yaml] add tests for specific mapping keys
1 parent 68d6415 commit 5a6f4e3

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/Symfony/Component/Yaml/Tests/InlineTest.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,4 +420,14 @@ public function testVeryLongQuotedStrings()
420420

421421
$this->assertEquals($longStringWithQuotes, $arrayFromYaml['longStringWithQuotes']);
422422
}
423+
424+
public function testBooleanMappingKeysAreConvertedToStrings()
425+
{
426+
$this->assertSame(array('false' => 'foo'), Inline::parse('{false: foo}'));
427+
}
428+
429+
public function testTheEmptyStringIsAValidMappingKey()
430+
{
431+
$this->assertSame(array('' => 'foo'), Inline::parse('{ "": foo }'));
432+
}
423433
}

0 commit comments

Comments
 (0)
0