Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit7043487

Browse files
committed
minor#38235 [Yaml] simplify the test (xabbuh)
This PR was merged into the 3.4 branch.Discussion----------[Yaml] simplify the test| Q | A| ------------- | ---| Branch? | 3.4| Bug fix? | no| New feature? | no| Deprecations? | no| Tickets |#38228 (comment)| License | MIT| Doc PR |Commits-------bb64fc9 [Yaml] simplify the test
2 parents7fa1257 +bb64fc9 commit7043487

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

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

Lines 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 =newParser();
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 beenrset the result will be the same as if a new parser was used
2388+
// After the total number of lines has beenreset 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)

[8]ページ先頭

©2009-2025 Movatter.jp