minor #21650 [Yaml] add tests for specific mapping keys (xabbuh)
This PR was merged into the 2.7 branch.
Discussion
----------
[Yaml] add tests for specific mapping keys
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | see https://github.com/symfony/symfony/pull/21643#discussion_r101703130
| License | MIT
| Doc PR |
Commits
-------
b8e0d705f6
[Yaml] add tests for specific mapping keys
This commit is contained in:
commit
0a15eea264
@ -421,4 +421,15 @@ class InlineTest extends 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 }'));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user