You are here

public function ParserTest::multiLineDataProvider in Lockr 7.3

File

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

Class

ParserTest

Namespace

Symfony\Component\Yaml\Tests

Code

public function multiLineDataProvider() {
  $tests = [];
  $yaml = <<<'EOF'
foo:
- bar:
    one

    two
    three
EOF;
  $expected = [
    'foo' => [
      [
        'bar' => "one\ntwo three",
      ],
    ],
  ];
  $tests[] = [
    $yaml,
    $expected,
    false,
  ];
  $yaml = <<<'EOF'
bar
"foo"
EOF;
  $expected = 'bar "foo"';
  $tests[] = [
    $yaml,
    $expected,
    false,
  ];
  $yaml = <<<'EOF'
bar
"foo
EOF;
  $expected = 'bar "foo';
  $tests[] = [
    $yaml,
    $expected,
    false,
  ];
  $yaml = <<<'EOF'
bar

'foo'
EOF;
  $expected = "bar\n'foo'";
  $tests[] = [
    $yaml,
    $expected,
    false,
  ];
  $yaml = <<<'EOF'
bar

foo'
EOF;
  $expected = "bar\nfoo'";
  $tests[] = [
    $yaml,
    $expected,
    false,
  ];
  return $tests;
}