We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 71960c2 commit 9199327Copy full SHA for 9199327
Tests/ParserTest.php
@@ -560,6 +560,32 @@ public function testEmptyValue()
560
$this->assertEquals(array('hash' => null), Yaml::parse($input));
561
}
562
563
+ public function testCommentAtTheRootIndent()
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
+
589
public function testStringBlockWithComments()
590
{
591
$this->assertEquals(array('content' => <<<EOT
0 commit comments