You are here

public function ParserTest::testCommentAtTheRootIndent in Lockr 7.3

File

vendor/symfony/yaml/Tests/ParserTest.php, line 1027

Class

ParserTest

Namespace

Symfony\Component\Yaml\Tests

Code

public function testCommentAtTheRootIndent() {
  $this
    ->assertEquals([
    'services' => [
      'app.foo_service' => [
        'class' => 'Foo',
      ],
      'app/bar_service' => [
        'class' => 'Bar',
      ],
    ],
  ], Yaml::parse(<<<'EOF'
# comment 1
services:
# comment 2
    # comment 3
    app.foo_service:
        class: Foo
# comment 4
    # comment 5
    app/bar_service:
        class: Bar
EOF
));
}