Skip to content

Commit

Permalink
Hopefully fix windows tests
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeTowers committed Jul 31, 2024
1 parent 03270d4 commit bb95ba6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions modules/system/tests/classes/UpdateManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

namespace System\Tests\Classes;

use RecursiveDirectoryIterator;
use RecursiveIteratorIterator;
use System\Tests\Bootstrap\TestCase;
use System\Classes\UpdateManager;
use Winter\Storm\Support\Facades\File;
Expand Down Expand Up @@ -88,7 +86,7 @@ public function testExtractPlugins($zipFile, $expectedPaths)
// Normalize paths to make sure comparison is correct regardless of OS
$normalizedPluginPaths = array_map('realpath', $pluginPaths);
$normalizedExpectedPaths = array_map(function ($path) use ($tempPath) {
return $tempPath . $path;
return str_replace(['/', '\\'], DIRECTORY_SEPARATOR, $tempPath . $path);
}, $expectedPaths);

$this->assertEquals($normalizedExpectedPaths, $normalizedPluginPaths);
Expand Down

0 comments on commit bb95ba6

Please sign in to comment.