Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit351bccb

Browse files
committed
minor#16074 [Yaml] Add regression test for comments indents (ogizanagi)
This PR was merged into the 2.3 branch.Discussion----------[Yaml] Add regression test for comments indents| Q | A| ------------- | ---| Bug fix? | no| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | -| License | MIT| Doc PR | -This is related to#16065,#15857 and#15860 (last one has been reverted due to this regression)Commits-------7b9d519 [Yaml] Add regression test for comments indents
2 parents510fdea +7b9d519 commit351bccb

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

‎src/Symfony/Component/Yaml/Tests/ParserTest.php‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,32 @@ public function testEmptyValue()
560560
$this->assertEquals(array('hash' =>null), Yaml::parse($input));
561561
}
562562

563+
publicfunctiontestCommentAtTheRootIndent()
564+
{
565+
$this->assertEquals(array(
566+
'services' =>array(
567+
'app.foo_service' =>array(
568+
'class' =>'Foo',
569+
),
570+
'app/bar_service' =>array(
571+
'class' =>'Bar',
572+
),
573+
),
574+
), Yaml::parse(<<<EOF
575+
# comment 1
576+
services:
577+
# comment 2
578+
# comment 3
579+
app.foo_service:
580+
class: Foo
581+
# comment 4
582+
# comment 5
583+
app/bar_service:
584+
class: Bar
585+
EOF
586+
));
587+
}
588+
563589
publicfunctiontestStringBlockWithComments()
564590
{
565591
$this->assertEquals(array('content' =><<<EOT

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp