Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit bb64fc9

Browse filesBrowse files
committed
[Yaml] simplify the test
1 parent 7fa1257 commit bb64fc9
Copy full SHA for bb64fc9

File tree

1 file changed

+3
-9
lines changed
Filter options

1 file changed

+3
-9
lines changed

‎src/Symfony/Component/Yaml/Tests/ParserTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Yaml/Tests/ParserTest.php
+3-9Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2381,19 +2381,13 @@ public function testParsingMultipleDocuments()
23812381
c: d
23822382
YAML;
23832383

2384-
$expected = ['a' => ['b' => "row\nrow2\n"], 'c' => 'd'];
2385-
2386-
// The parser was not used before, so there is a new line after row2
2387-
$this->assertSame($expected, $this->parser->parse($longDocument));
2388-
2389-
$parser = new Parser();
23902384
// The first parsing set and fixed the totalNumberOfLines in the Parser before, so parsing the short document here
23912385
// to reproduce the issue. If the issue would not have been fixed, the next assertion will fail
2392-
$parser->parse($shortDocument);
2386+
$this->parser->parse($shortDocument);
23932387

2394-
// After the total number of lines has been rset the result will be the same as if a new parser was used
2388+
// After the total number of lines has been reset the result will be the same as if a new parser was used
23952389
// (before, there was no \n after row2)
2396-
$this->assertSame($expected, $parser->parse($longDocument));
2390+
$this->assertSame(['a' => ['b' => "row\nrow2\n"], 'c' => 'd'], $this->parser->parse($longDocument));
23972391
}
23982392
}
23992393

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.