Skip to content

Commit aa40236

Browse files
committed
test: update tests to work on windows
1 parent d51811b commit aa40236

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

tests/path.test.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,15 @@
2929
test('Can join paths', function () {
3030
$path2 = '/path/to';
3131

32-
expect(path($path2)->join('file2.txt'))->toBe('/path/to/file2.txt');
32+
expect(path($path2)->join('file2.txt'))->toBe(
33+
DIRECTORY_SEPARATOR . 'path' . DIRECTORY_SEPARATOR . 'to' . DIRECTORY_SEPARATOR . 'file2.txt'
34+
);
3335
});
3436

3537
test('Can normalize path', function () {
3638
$path = '/path/to/../to/file.txt';
3739

38-
expect(path($path)->normalize())->toBe('/path/to/file.txt');
40+
expect(path($path)->normalize())->toBe(
41+
DIRECTORY_SEPARATOR . 'path' . DIRECTORY_SEPARATOR . 'to' . DIRECTORY_SEPARATOR . 'file.txt'
42+
);
3943
});

0 commit comments

Comments
 (0)