Skip to content

Commit b8e0d70

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

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/Symfony/Component/Yaml/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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy