File tree 1 file changed +14
-0
lines changed
src/Symfony/Component/Yaml/Tests 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line chan
B077
ge @@ -687,6 +687,20 @@ public function testVeryLongQuotedStrings()
687
687
$ this ->assertEquals ($ longStringWithQuotes , $ arrayFromYaml ['longStringWithQuotes ' ]);
688
688
}
689
689
690
+ public function testBooleanMappingKeysAreConvertedToStrings ()
691
+ {
692
+ $ this ->assertSame (array ('false ' => 'foo ' ), Inline::parse ('{false: foo} ' ));
693
+ }
694
+
695
+ public function testTheEmptyStringIsAValidMappingKey ()
696
+ {
697
+ $ this ->assertSame (array ('' => 'foo ' ), Inline::parse ('{ "": foo } ' ));
698
+ }
699
+
700
+ /**
701
+ * @group legacy
702
+ * @expectedDeprecation Omitting the key of a mapping is deprecated and will throw a ParseException in 4.0.
703
+ */
690
704
public function testOmittedMappingKeyIsParsedAsColon ()
691
705
{
692
706
$ this ->assertSame (array (': ' => 'foo ' ), Inline::parse ('{: foo} ' ));
You can’t perform that action at this time.
0 commit comments