[Yaml] add tests for specific mapping keys

This commit is contained in:
Christian Flothmann 2017-02-17 14:04:52 +01:00
parent 68d6415955
commit b8e0d705f6

View File

@ -420,4 +420,15 @@ class InlineTest extends \PHPUnit_Framework_TestCase
$this->assertEquals($longStringWithQuotes, $arrayFromYaml['longStringWithQuotes']);
}
public function testBooleanMappingKeysAreConvertedToStrings()
{
$this->assertSame(array('false' => 'foo'), Inline::parse('{false: foo}'));
$this->assertSame(array('true' => 'foo'), Inline::parse('{true: foo}'));
}
public function testTheEmptyStringIsAValidMappingKey()
{
$this->assertSame(array('' => 'foo'), Inline::parse('{ "": foo }'));
}
}