@@ -63,7 +63,7 @@ public function testReconstructsADocCommentFromADocBlock(): void
6363 ]
6464 );
6565
66- $ this ->assertSame ($ expected , $ fixture ->getDocComment ($ docBlock ));
66+ $ this ->assertSameString ($ expected , $ fixture ->getDocComment ($ docBlock ));
6767 }
6868
6969 /**
@@ -98,7 +98,7 @@ public function testAddPrefixToDocBlock(): void
9898 ]
9999 );
100100
101- $ this ->assertSame ($ expected , $ fixture ->getDocComment ($ docBlock ));
101+ $ this ->assertSameString ($ expected , $ fixture ->getDocComment ($ docBlock ));
102102 }
103103
104104 /**
@@ -133,7 +133,7 @@ public function testAddPrefixToDocBlockExceptFirstLine(): void
133133 ]
134134 );
135135
136- $ this ->assertSame ($ expected , $ fixture ->getDocComment ($ docBlock ));
136+ $ this ->assertSameString ($ expected , $ fixture ->getDocComment ($ docBlock ));
137137 }
138138
139139 /**
@@ -174,7 +174,7 @@ public function testWordwrapsAroundTheGivenAmountOfCharacters(): void
174174 ]
175175 );
176176
177- $ this ->assertSame ($ expected , $ fixture ->getDocComment ($ docBlock ));
177+ $ this ->assertSameString ($ expected , $ fixture ->getDocComment ($ docBlock ));
178178 }
179179
180180 /**
@@ -198,9 +198,16 @@ public function testNoExtraSpacesAfterTagRemoval(): void
198198 $ genericTag = new DocBlock \Tags \Generic ('unknown-tag ' );
199199
200200 $ docBlock = new DocBlock ('' , null , [$ genericTag ]);
201- $ this ->assertSame ($ expected , $ fixture ->getDocComment ($ docBlock ));
201+ $ this ->assertSameString ($ expected , $ fixture ->getDocComment ($ docBlock ));
202202
203203 $ docBlock ->removeTag ($ genericTag );
204- $ this ->assertSame ($ expectedAfterRemove , $ fixture ->getDocComment ($ docBlock ));
204+ $ this ->assertSameString ($ expectedAfterRemove , $ fixture ->getDocComment ($ docBlock ));
205+ }
206+
207+ public function assertSameString (string $ expected , string $ actual ): void
208+ {
209+ $ expected = str_replace (PHP_EOL , "\n" , $ expected );
210+
211+ self ::assertSame ($ expected , $ actual );
205212 }
206213}
0 commit comments