From 2a4832b31ffb484718607584683ddba87cbb6a9e Mon Sep 17 00:00:00 2001 From: Bradley Taylor Date: Sun, 15 Jan 2023 11:20:16 +0000 Subject: [PATCH] (REF) Tidy up properties in CRM_Core_ResourcesTest --- tests/phpunit/CRM/Core/ResourcesTest.php | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/tests/phpunit/CRM/Core/ResourcesTest.php b/tests/phpunit/CRM/Core/ResourcesTest.php index ac9ccda088..ca838ee686 100644 --- a/tests/phpunit/CRM/Core/ResourcesTest.php +++ b/tests/phpunit/CRM/Core/ResourcesTest.php @@ -40,7 +40,7 @@ class CRM_Core_ResourcesTest extends CiviUnitTestCase { public function setUp(): void { parent::setUp(); - list ($this->basedir, $this->container, $this->mapper) = $this->_createMapper(); + $this->mapper = $this->createMapper(); $cache = new CRM_Utils_Cache_Arraycache([]); $this->res = new CRM_Core_Resources($this->mapper, new CRM_Core_Resources_Strings($cache), NULL); $this->res->setCacheCode('resTest'); @@ -427,22 +427,18 @@ class CRM_Core_ResourcesTest extends CiviUnitTestCase { } /** - * @param CRM_Utils_Cache_Interface $cache - * @param string $cacheKey - * - * @return array - * [string $basedir, CRM_Extension_Container_Interface, CRM_Extension_Mapper] + * @return CRM_Extension_Mapper */ - public function _createMapper(CRM_Utils_Cache_Interface $cache = NULL, $cacheKey = NULL) { + private function createMapper() { $basedir = rtrim($this->createTempDir('ext-'), '/'); mkdir("$basedir/com.example.ext"); mkdir("$basedir/com.example.ext/js"); file_put_contents("$basedir/com.example.ext/info.xml", "oddball"); file_put_contents("$basedir/com.example.ext/js/example.js", "alert('Boo!');"); // not needed for now // file_put_contents("$basedir/weird/bar/oddball.php", "