Skip to content

Commit 52ff438

Browse files
committed
[Yaml] add tests for specific mapping keys
1 parent 59cf221 commit 52ff438

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Tests/InlineTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,4 +420,15 @@ 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+
$this->assertSame(array('true' => 'foo'), Inline::parse('{true: foo}'));
428+
}
429+
430+
public function testTheEmptyStringIsAValidMappingKey()
431+
{
432+
$this->assertSame(array('' => 'foo'), Inline::parse('{ "": foo }'));
433+
}
423434
}

0 commit comments

Comments
 (0)