Commit 793b8d3 1 parent 350687d commit 793b8d3 Copy full SHA for 793b8d3
File tree 1 file changed +31
-0
lines changed
1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -98,6 +98,37 @@ public function testLoadShouldIgnoreLineEndingsInIssueSnippet(): void
98
98
);
99
99
}
100
100
101
+ public function testShouldIgnoreCarriageReturnInMultilineSnippets (): void
102
+ {
103
+ $ baselineFilePath = 'baseline.xml ' ;
104
+
105
+ $ this ->fileProvider ->allows ()->fileExists ($ baselineFilePath )->andReturns (true );
106
+ $ this ->fileProvider ->allows ()->getContents ($ baselineFilePath )->andReturns (
107
+ "<?xml version= \"1.0 \" encoding= \"UTF-8 \"?>
108
+ <files>
109
+ <file src= \"sample/sample-file.php \">
110
+ <MixedAssignment>
111
+ <code>
112
+ foo
113
+ bar
114
+ </code>
115
+ </MixedAssignment>
116
+ </file>
117
+ </files> " ,
118
+ );
119
+
120
+ $ expectedParsedBaseline = [
121
+ 'sample/sample-file.php ' => [
122
+ 'MixedAssignment ' => ['o ' => 1 , 's ' => ["foo \nbar " ]],
123
+ ],
124
+ ];
125
+
126
+ $ this ->assertSame (
127
+ $ expectedParsedBaseline ,
128
+ ErrorBaseline::read ($ this ->fileProvider , $ baselineFilePath ),
129
+ );
130
+ }
131
+
101
132
public function testLoadShouldThrowExceptionWhenFilesAreNotDefinedInBaselineFile (): void
102
133
{
103
134
$ this ->expectException (ConfigException::class);
You can’t perform that action at this time.
0 commit comments