diff --git a/src/Core/Manifest/Module.php b/src/Core/Manifest/Module.php index f5de81e32..02b22d4fb 100644 --- a/src/Core/Manifest/Module.php +++ b/src/Core/Manifest/Module.php @@ -161,7 +161,7 @@ class Module implements Serializable * @param string $path File or directory path relative to module directory * @return string Path relative to base directory */ - public function getResource($path) + public function getResourcePath($path) { return File::join_paths($this->getRelativePath(), $path); } @@ -175,7 +175,7 @@ class Module implements Serializable */ public function hasResource($path) { - $resource = $this->getResource($path); + $resource = $this->getResourcePath($path); return file_exists($this->basePath . '/' . $resource); } } diff --git a/tests/php/Core/Manifest/ModuleManifestTest.php b/tests/php/Core/Manifest/ModuleManifestTest.php index cfef11688..5e8d98d37 100644 --- a/tests/php/Core/Manifest/ModuleManifestTest.php +++ b/tests/php/Core/Manifest/ModuleManifestTest.php @@ -81,7 +81,7 @@ class ModuleManifestTest extends SapphireTest $this->assertFalse($module->hasResource('package.json')); $this->assertEquals( 'moduleb/composer.json', - $module->getResource('composer.json') + $module->getResourcePath('composer.json') ); } }