Skip to content

Commit

Permalink
fix case sensitivity in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Baptouuuu committed Jul 9, 2023
1 parent a1cca66 commit 4e79984
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions proofs/adapter/filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,12 @@
function($assert, $properties) {
$path = \sys_get_temp_dir().'/innmind/filesystem/';
(new FS)->remove($path);
$filesystem = Filesystem::mount(Path::of($path))->withCaseSensitivity(match (\PHP_OS) {
'Darwin' => CaseSensitivity::insensitive,
default => CaseSensitivity::sensitive,
});;

$properties->ensureHeldBy($assert, Filesystem::mount(Path::of($path)));
$properties->ensureHeldBy($assert, $filesystem);

(new FS)->remove($path);
},
Expand All @@ -34,7 +38,10 @@ function($assert, $properties) {
function($assert, $property) {
$path = \sys_get_temp_dir().'/innmind/filesystem/';
(new FS)->remove($path);
$filesystem = Filesystem::mount(Path::of($path));
$filesystem = Filesystem::mount(Path::of($path))->withCaseSensitivity(match (\PHP_OS) {
'Darwin' => CaseSensitivity::insensitive,
default => CaseSensitivity::sensitive,
});;

if ($property->applicableTo($filesystem)) {
$property->ensureHeldBy($assert, $filesystem);
Expand Down

0 comments on commit 4e79984

Please sign in to comment.