Skip to content

Commit 72145f0

Browse files
authored
Merge pull request #12 from PHPCSStandards/feature/tokenlist-test-stabilize-test-lineendings
Debug/TokenList: stabilize line endings in unit tests
2 parents 5611b58 + 35f7cac commit 72145f0

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

Debug/Tests/Debug/TokenListZUnitTest.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,14 @@ class TokenListZUnitTest extends TestCase
2929
*/
3030
public function testOutput()
3131
{
32-
$output = trim(TokenListUnitTest::$output);
32+
$output = str_replace(["\r\n", "\r"], "\n", TokenListUnitTest::$output);
3333

3434
$this->assertNotEmpty($output);
3535

36-
$expected = 'Ptr :: Ln :: Col :: Cond :: Token Type :: [len]: Content';
37-
$expected .= PHP_EOL;
38-
$expected .= '-------------------------------------------------------------------------';
39-
$expected .= PHP_EOL;
40-
$expected .= ' 0 :: L1 :: C 1 :: CC 0 :: T_OPEN_TAG :: [5]: <?php';
36+
$expected = "\n";
37+
$expected .= 'Ptr :: Ln :: Col :: Cond :: Token Type :: [len]: Content' . "\n";
38+
$expected .= '-------------------------------------------------------------------------' . "\n";
39+
$expected .= ' 0 :: L1 :: C 1 :: CC 0 :: T_OPEN_TAG :: [5]: <?php' . "\n\n";
4140

4241
$this->assertSame($expected, $output);
4342
}

0 commit comments

Comments
 (0)