diff --git a/modules/system/classes/PluginManager.php b/modules/system/classes/PluginManager.php index 507d75c3e..491822060 100644 --- a/modules/system/classes/PluginManager.php +++ b/modules/system/classes/PluginManager.php @@ -211,7 +211,6 @@ class PluginManager /** * Returns the directory path to a plugin - * */ public function getPluginPath($id) { @@ -220,7 +219,7 @@ class PluginManager return null; } - return $this->pathMap[$classId]; + return File::normalizePath($this->pathMap[$classId]); } /** diff --git a/tests/unit/system/classes/PluginManagerTest.php b/tests/unit/system/classes/PluginManagerTest.php index ff0a92f5a..dbfcff19a 100644 --- a/tests/unit/system/classes/PluginManagerTest.php +++ b/tests/unit/system/classes/PluginManagerTest.php @@ -72,7 +72,8 @@ class PluginManagerTest extends TestCase { $manager = PluginManager::instance(); $result = $manager->getPluginPath('October\Tester'); - $this->assertEquals(base_path() . '/tests/fixtures/system/plugins/october/tester', $result); + $basePath = str_replace('\\', '/', base_path()); + $this->assertEquals($basePath . '/tests/fixtures/system/plugins/october/tester', $result); } public function testGetPlugins()