Skip to content

Commit

Permalink
Merge pull request #4 from 8ctopus/dev-fix-tests-on-windows
Browse files Browse the repository at this point in the history
Fix tests on Windows
  • Loading branch information
brentscheffler authored May 26, 2024
2 parents ca2ddb1 + 9081b55 commit fe25b8e
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tests/UploadedFileTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,17 @@ public function test_move_to_unwriteable_target_throws_runtime_exception(): void
$uploadedFile = $this->makeFile();

$this->expectException(RuntimeException::class);
$uploadedFile->moveTo("/root");

switch (PHP_OS) {
case 'WINNT':
$destination = 'C:\\';
break;

default:
$destination = '/root';
}

$uploadedFile->moveTo($destination);
}

public function test_calling_move_to_more_than_once_throws_exception(): void
Expand Down

0 comments on commit fe25b8e

Please sign in to comment.