Skip to content

Commit bbf090c

Browse files
Merge pull request #19699 from kamil-tekiela/Fix-new-test-on-Windows
Fix new test on Windows
2 parents 2cb656f + 960931e commit bbf090c

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

tests/unit/Command/TwigLintCommandTest.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,16 @@ public function testGetFilesInfoInvalidFile(): void
9191

9292
self::assertCount(2, $filesFound);
9393
self::assertSame('{{ file }' . "\n", $filesFound[0]['template']);
94-
self::assertSame($path . '/foo-invalid.twig', $filesFound[0]['file']);
94+
self::assertSame($path . DIRECTORY_SEPARATOR . 'foo-invalid.twig', $filesFound[0]['file']);
9595
self::assertArrayHasKey('exception', $filesFound[0]);
9696
$exception = $filesFound[0]['exception'];
9797
self::assertInstanceOf(SyntaxError::class, $exception);
98-
self::assertSame('Unexpected "}" in "' . $path . '/foo-invalid.twig" at line 1.', $exception->getMessage());
98+
self::assertSame(
99+
'Unexpected "}" in "' . $path . DIRECTORY_SEPARATOR . 'foo-invalid.twig" at line 1.',
100+
$exception->getMessage(),
101+
);
99102
self::assertSame('{{ file }}' . "\n", $filesFound[1]['template']);
100-
self::assertSame($path . '/foo-valid.twig', $filesFound[1]['file']);
103+
self::assertSame($path . DIRECTORY_SEPARATOR . 'foo-valid.twig', $filesFound[1]['file']);
101104
}
102105

103106
public function testGetContext(): void

0 commit comments

Comments
 (0)