You are here

public function DumperTest::testDumpMultiLineStringAsScalarBlock in Lockr 7.3

File

vendor/symfony/yaml/Tests/DumperTest.php, line 441

Class

DumperTest

Namespace

Symfony\Component\Yaml\Tests

Code

public function testDumpMultiLineStringAsScalarBlock() {
  $data = [
    'data' => [
      'single_line' => 'foo bar baz',
      'multi_line' => "foo\nline with trailing spaces:\n  \nbar\ninteger like line:\n123456789\nempty line:\n\nbaz",
      'multi_line_with_carriage_return' => "foo\nbar\r\nbaz",
      'nested_inlined_multi_line_string' => [
        'inlined_multi_line' => "foo\nbar\r\nempty line:\n\nbaz",
      ],
    ],
  ];
  $this
    ->assertSame(file_get_contents(__DIR__ . '/Fixtures/multiple_lines_as_literal_block.yml'), $this->dumper
    ->dump($data, 2, 0, Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK));
}