You are here

public function ParserTest::multiLineDataProvider in Database Sanitize 7

File

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

Class

ParserTest

Namespace

Symfony\Component\Yaml\Tests

Code

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

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

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

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