diff --git a/src/FuzeWorks/ComponentPathsTrait.php b/src/FuzeWorks/ComponentPathsTrait.php new file mode 100644 index 0000000..1c80264 --- /dev/null +++ b/src/FuzeWorks/ComponentPathsTrait.php @@ -0,0 +1,95 @@ +componentPaths = array_merge($this->componentPaths, $componentPaths); + } + + /** + * Add a path where objects for this component can be found + * + * @param string $componentPath + */ + public function addComponentPath($componentPath) + { + if (!in_array($componentPath, $this->componentPaths)) + { + $this->componentPaths[] = $componentPath; + } + } + + /** + * Remove a path where objects for this component can be found + * + * @param string $componentPath + */ + public function removeComponentPath($componentPath) + { + if (($key = array_search($componentPath, $this->componentPaths)) !== false) + { + unset($this->componentPaths[$key]); + } + } + + /** + * Get a list of all current componentPaths + * + * @return array of paths where objects for this component can be found + */ + public function getComponentPaths(): array + { + return $this->componentPaths; + } +} \ No newline at end of file diff --git a/src/FuzeWorks/Config.php b/src/FuzeWorks/Config.php index 1019169..74b1aea 100644 --- a/src/FuzeWorks/Config.php +++ b/src/FuzeWorks/Config.php @@ -50,6 +50,7 @@ use FuzeWorks\Exception\EventException; */ class Config { + use ComponentPathsTrait; /** * Array where all config files are saved while FuzeWorks runs @@ -65,18 +66,9 @@ class Config */ public static $configOverrides = []; - /** - * Paths where Helpers can be found. - * - * Libraries will only be loaded if either a directory is supplied or it is in one of the helperPaths - * - * @var array Array of paths where helpers can be found - */ - protected $configPaths = []; - public function __construct() { - $this->configPaths = Core::$appDirs; + $this->componentPaths = Core::$appDirs; } /** @@ -90,7 +82,7 @@ class Config public function getConfig(string $configName, array $configPaths = []): ConfigORM { // First determine what directories to use - $directories = (empty($configPaths) ? $this->configPaths : $configPaths); + $directories = (empty($configPaths) ? $this->componentPaths : $configPaths); // Determine the config name $configName = strtolower($configName); @@ -225,52 +217,4 @@ class Config self::$configOverrides[$configName][$configKey] = $configValue; } - /** - * Set the directories. Automatically gets invoked if configPaths are added to FuzeWorks\Configurator. - * - * @param array $directories - */ - public function setDirectories(array $directories) - { - $this->configPaths = array_merge($this->configPaths, $directories); - } - - /** - * Add a path where config files can be found - * - * @param string $directory The directory - * @return void - */ - public function addConfigPath($directory) - { - if (!in_array($directory, $this->configPaths)) - { - $this->configPaths[] = $directory; - } - } - - /** - * Remove a path where config files can be found - * - * @param string $directory The directory - * @return void - */ - public function removeConfigPath($directory) - { - if (($key = array_search($directory, $this->configPaths)) !== false) - { - unset($this->configPaths[$key]); - } - } - - /** - * Get a list of all current configPaths - * - * @return array Array of paths where config files can be found - */ - public function getConfigPaths(): array - { - return $this->configPaths; - } - } \ No newline at end of file diff --git a/src/FuzeWorks/Helpers.php b/src/FuzeWorks/Helpers.php index 5522af8..8a5925a 100644 --- a/src/FuzeWorks/Helpers.php +++ b/src/FuzeWorks/Helpers.php @@ -60,6 +60,7 @@ use FuzeWorks\Exception\HelperException; */ class Helpers { + use ComponentPathsTrait; /** * Array of loadedHelpers, so that they won't be reloaded @@ -68,18 +69,9 @@ class Helpers */ protected $helpers = []; - /** - * Paths where Helpers can be found. - * - * Libraries will only be loaded if either a directory is supplied or it is in one of the helperPaths - * - * @var array Array of paths where helpers can be found - */ - protected $helperPaths = []; - public function __construct() { - $this->helperPaths = Core::$appDirs; + $this->componentPaths = Core::$appDirs; } /** @@ -96,7 +88,7 @@ class Helpers public function load(string $helperName, array $helperDirectories = []): bool { // Determine what directories should be checked - $helperPaths = (empty($helperDirectories) ? $this->helperPaths : $helperDirectories); + $helperPaths = (empty($helperDirectories) ? $this->componentPaths : $helperDirectories); // Check it is already loaded if (isset($this->helpers[$helperName])) @@ -163,52 +155,4 @@ class Helpers { return $this->load($helperName, $helperPaths); } - - /** - * Set the directories. Automatically gets invoked if helperPaths are added to FuzeWorks\Configurator. - * - * @param array $directories - */ - public function setDirectories(array $directories) - { - $this->helperPaths = array_merge($this->helperPaths, $directories); - } - - /** - * Add a path where helpers can be found - * - * @param string $directory The directory - * @return void - */ - public function addHelperPath($directory) - { - if (!in_array($directory, $this->helperPaths)) - { - $this->helperPaths[] = $directory; - } - } - - /** - * Remove a path where helpers can be found - * - * @param string $directory The directory - * @return void - */ - public function removeHelperPath($directory) - { - if (($key = array_search($directory, $this->helperPaths)) !== false) - { - unset($this->helperPaths[$key]); - } - } - - /** - * Get a list of all current helperPaths - * - * @return array Array of paths where helpers can be found - */ - public function getHelperPaths(): array - { - return $this->helperPaths; - } } \ No newline at end of file diff --git a/src/FuzeWorks/Libraries.php b/src/FuzeWorks/Libraries.php index 9a6ebdf..551a10f 100644 --- a/src/FuzeWorks/Libraries.php +++ b/src/FuzeWorks/Libraries.php @@ -36,18 +36,12 @@ namespace FuzeWorks; - use FuzeWorks\Exception\ConfigException; use FuzeWorks\Exception\LibraryException; class Libraries { - /** - * Array of all the paths where libraries can be found - * - * @var array Library paths - */ - protected $libraryPaths = []; + use ComponentPathsTrait; /** * Array of loaded library objects @@ -78,7 +72,7 @@ class Libraries public function __construct() { $this->factory = Factory::getInstance(); - $this->libraryPaths = Core::$appDirs; + $this->componentPaths = Core::$appDirs; } /** @@ -142,7 +136,7 @@ class Libraries return $this->initLibrary($libraryName, $this->libraryClasses[$libraryNameLowerCase], $parameters); // Try and load from the alternate directory if provided - $paths = (empty($altDirectories) ? $this->libraryPaths : $altDirectories); + $paths = (empty($altDirectories) ? $this->componentPaths : $altDirectories); // Try and find the library in the libraryPaths foreach ($paths as $path) @@ -209,52 +203,4 @@ class Libraries $this->factory->logger->log("Loaded Library: ".$libraryName); return $this->libraryObjects[strtolower($libraryName)]; } - - /** - * Set the directories. Automatically gets invoked if libraryPaths are added to FuzeWorks\Configurator. - * - * @param array $directories - */ - public function setDirectories(array $directories) - { - $this->libraryPaths = array_merge($this->libraryPaths, $directories); - } - - /** - * Add a path where libraries can be found - * - * @param string $directory The directory - * @return void - */ - public function addLibraryPath($directory) - { - if (!in_array($directory, $this->libraryPaths)) - { - $this->libraryPaths[] = $directory; - } - } - - /** - * Remove a path where libraries can be found - * - * @param string $directory The directory - * @return void - */ - public function removeLibraryPath($directory) - { - if (($key = array_search($directory, $this->libraryPaths)) !== false) - { - unset($this->libraryPaths[$key]); - } - } - - /** - * Get a list of all current libraryPaths - * - * @return array Array of paths where libraries can be found - */ - public function getLibraryPaths(): array - { - return $this->libraryPaths; - } } \ No newline at end of file diff --git a/src/FuzeWorks/Plugins.php b/src/FuzeWorks/Plugins.php index 137e204..69ffbe6 100644 --- a/src/FuzeWorks/Plugins.php +++ b/src/FuzeWorks/Plugins.php @@ -62,13 +62,7 @@ use ReflectionException; */ class Plugins { - - /** - * Array of all the paths where plugins can be found - * - * @var array Plugin paths - */ - protected $pluginPaths = array(); + use ComponentPathsTrait; /** * Array of loaded Plugins, so that they won't be reloaded @@ -101,7 +95,7 @@ class Plugins public function __construct() { $this->cfg = Factory::getInstance()->config->plugins; - $this->pluginPaths = Core::$appDirs; + $this->componentPaths = Core::$appDirs; } /** @@ -110,7 +104,7 @@ class Plugins public function loadHeadersFromPluginPaths() { // Cycle through all pluginPaths - foreach ($this->pluginPaths as $pluginPath) { + foreach ($this->componentPaths as $pluginPath) { // If directory does not exist, skip it if (!file_exists($pluginPath) || !is_dir($pluginPath)) @@ -286,52 +280,4 @@ class Plugins // And return it return $this->plugins[$pluginName]; } - - /** - * Set the directories. Automatically gets invoked if pluginPaths are added to FuzeWorks\Configurator. - * - * @param array $directories - */ - public function setDirectories(array $directories) - { - $this->pluginPaths = array_merge($this->pluginPaths, $directories); - } - - /** - * Add a path where plugins can be found - * - * @param string $directory The directory - * @return void - */ - public function addPluginPath($directory) - { - if (!in_array($directory, $this->pluginPaths)) - { - $this->pluginPaths[] = $directory; - } - } - - /** - * Remove a path where plugins can be found - * - * @param string $directory The directory - * @return void - */ - public function removePluginPath($directory) - { - if (($key = array_search($directory, $this->pluginPaths)) !== false) - { - unset($this->pluginPaths[$key]); - } - } - - /** - * Get a list of all current pluginPaths - * - * @return array Array of paths where plugins can be found - */ - public function getPluginPaths(): array - { - return $this->pluginPaths; - } } \ No newline at end of file diff --git a/test/config/TestAddConfigPath/config.testaddconfigpath.php b/test/config/TestAddComponentPath/config.testaddcomponentpath.php similarity index 100% rename from test/config/TestAddConfigPath/config.testaddconfigpath.php rename to test/config/TestAddComponentPath/config.testaddcomponentpath.php diff --git a/test/core/core_configTest.php b/test/core/core_configTest.php index 2a3eeb2..ee2954b 100644 --- a/test/core/core_configTest.php +++ b/test/core/core_configTest.php @@ -154,40 +154,40 @@ class configTest extends CoreTestAbstract /** * @expectedException FuzeWorks\Exception\ConfigException */ - public function testAddConfigPathFail() + public function testAddComponentPathFail() { // Now test if the config can be loaded (hint: it can not) - $this->config->getConfig('testAddConfigPath'); + $this->config->getConfig('testAddComponentPath'); } /** - * @depends testAddConfigPathFail + * @depends testAddComponentPathFail */ - public function testAddConfigPath() + public function testaddComponentPath() { // Add the configPath - $this->config->addConfigPath('test'.DS.'config'.DS.'TestAddConfigPath'); + $this->config->addComponentPath('test'.DS.'config'.DS.'TestAddComponentPath'); // And try to load it again - $this->assertInstanceOf('FuzeWorks\ConfigORM\ConfigORM', $this->config->getConfig('testAddConfigPath')); + $this->assertInstanceOf('FuzeWorks\ConfigORM\ConfigORM', $this->config->getConfig('testAddComponentPath')); } - public function testRemoveConfigPath() + public function testremoveComponentPath() { // Test if the path does NOT exist - $this->assertFalse(in_array('test'.DS.'config'.DS.'TestRemoveConfigPath', $this->config->getConfigPaths())); + $this->assertFalse(in_array('test'.DS.'config'.DS.'TestRemoveComponentPath', $this->config->getComponentPaths())); // Add it - $this->config->addConfigPath('test'.DS.'config'.DS.'TestRemoveConfigPath'); + $this->config->addComponentPath('test'.DS.'config'.DS.'TestRemoveComponentPath'); // Assert if it's there - $this->assertTrue(in_array('test'.DS.'config'.DS.'TestRemoveConfigPath', $this->config->getConfigPaths())); + $this->assertTrue(in_array('test'.DS.'config'.DS.'TestRemoveComponentPath', $this->config->getComponentPaths())); // Remove it - $this->config->removeConfigPath('test'.DS.'config'.DS.'TestRemoveConfigPath'); + $this->config->removeComponentPath('test'.DS.'config'.DS.'TestRemoveComponentPath'); // And test if it's gone again - $this->assertFalse(in_array('test'.DS.'config'.DS.'TestRemoveConfigPath', $this->config->getConfigPaths())); + $this->assertFalse(in_array('test'.DS.'config'.DS.'TestRemoveComponentPath', $this->config->getComponentPaths())); } public function testSameConfigObject() @@ -214,7 +214,7 @@ class configTest extends CoreTestAbstract // Assert expectations $expected = array_merge(\FuzeWorks\Core::$appDirs, [$directory]); - $this->assertEquals($expected, $this->config->getConfigPaths()); + $this->assertEquals($expected, $this->config->getComponentPaths()); } } diff --git a/test/core/core_helperTest.php b/test/core/core_helperTest.php index f64b982..79bc81b 100644 --- a/test/core/core_helperTest.php +++ b/test/core/core_helperTest.php @@ -154,57 +154,57 @@ class helperTest extends CoreTestAbstract * @expectedException FuzeWorks\Exception\HelperException * @covers \FuzeWorks\Helpers::load */ - public function testAddHelperPathFail() + public function testAddComponentPathFail() { // First test if the function is not loaded yet - $this->assertFalse(function_exists('testAddHelperPathFunction')); + $this->assertFalse(function_exists('testAddComponentPathFunction')); // Now test if the helper can be loaded (hint: it can not) - $this->helpers->load('TestAddHelperPathFail'); + $this->helpers->load('TestAddComponentPathFail'); } /** - * @depends testAddHelperPathFail - * @covers \FuzeWorks\Helpers::addHelperPath - * @covers \FuzeWorks\Helpers::getHelperPaths + * @depends testAddComponentPathFail + * @covers \FuzeWorks\Helpers::addComponentPath + * @covers \FuzeWorks\Helpers::getComponentPaths */ - public function testAddHelperPath() + public function testAddComponentPath() { - // Add the helperPath - $this->helpers->addHelperPath('test'.DS.'helpers'.DS.'TestAddHelperPath'); + // Add the componentPath + $this->helpers->addComponentPath('test'.DS.'helpers'.DS.'TestAddComponentPath'); // And try to load it again - $this->assertTrue($this->helpers->load('TestAddHelperPath')); + $this->assertTrue($this->helpers->load('TestAddComponentPath')); // And test if the function is loaded - $this->assertTrue(function_exists('testAddHelperPathFunction')); + $this->assertTrue(function_exists('testAddComponentPathFunction')); } /** - * @covers \FuzeWorks\Helpers::removeHelperPath - * @covers \FuzeWorks\Helpers::getHelperPaths + * @covers \FuzeWorks\Helpers::removeComponentPath + * @covers \FuzeWorks\Helpers::getComponentPaths */ - public function testRemoveHelperPath() + public function testRemoveComponentPath() { // Test if the path does NOT exist - $this->assertFalse(in_array('test'.DS.'helpers'.DS.'TestRemoveHelperPath', $this->helpers->getHelperPaths())); + $this->assertFalse(in_array('test'.DS.'helpers'.DS.'TestRemoveComponentPath', $this->helpers->getComponentPaths())); // Add it - $this->helpers->addHelperPath('test'.DS.'helpers'.DS.'TestRemoveHelperPath'); + $this->helpers->addComponentPath('test'.DS.'helpers'.DS.'TestRemoveComponentPath'); // Assert if it's there - $this->assertTrue(in_array('test'.DS.'helpers'.DS.'TestRemoveHelperPath', $this->helpers->getHelperPaths())); + $this->assertTrue(in_array('test'.DS.'helpers'.DS.'TestRemoveComponentPath', $this->helpers->getComponentPaths())); // Remove it - $this->helpers->removeHelperPath('test'.DS.'helpers'.DS.'TestRemoveHelperPath'); + $this->helpers->removeComponentPath('test'.DS.'helpers'.DS.'TestRemoveComponentPath'); // And test if it's gone again - $this->assertFalse(in_array('test'.DS.'helpers'.DS.'TestRemoveHelperPath', $this->helpers->getHelperPaths())); + $this->assertFalse(in_array('test'.DS.'helpers'.DS.'TestRemoveComponentPath', $this->helpers->getComponentPaths())); } /** * @covers \FuzeWorks\Helpers::setDirectories - * @covers \FuzeWorks\Helpers::getHelperPaths + * @covers \FuzeWorks\Helpers::getComponentPaths */ public function testSetDirectories() { @@ -214,6 +214,6 @@ class helperTest extends CoreTestAbstract // Assert expectations $expected = array_merge(\FuzeWorks\Core::$appDirs, ['test' . DS . 'helpers', $directory]); - $this->assertEquals($expected, $this->helpers->getHelperPaths()); + $this->assertEquals($expected, $this->helpers->getComponentPaths()); } } diff --git a/test/core/core_libraryTest.php b/test/core/core_libraryTest.php index 3a72d33..e08b526 100644 --- a/test/core/core_libraryTest.php +++ b/test/core/core_libraryTest.php @@ -65,7 +65,7 @@ class libraryTest extends CoreTestAbstract $this->assertInstanceOf('FuzeWorks\Libraries', $this->libraries); } - /* ---------------------------------- LibraryPaths ---------------------------------------------- */ + /* ---------------------------------- ComponentPaths ---------------------------------------------- */ /** * @depends testLibrariesClass @@ -74,56 +74,56 @@ class libraryTest extends CoreTestAbstract { // Test initial $initial = array_merge(Core::$appDirs, ['test'.DS.'libraries']); - $this->assertEquals($initial, $this->libraries->getLibraryPaths()); + $this->assertEquals($initial, $this->libraries->getComponentPaths()); // Add path $newPath = 'addPath'; $this->libraries->setDirectories([$newPath]); $initial[] = $newPath; - $this->assertEquals($initial, $this->libraries->getLibraryPaths()); + $this->assertEquals($initial, $this->libraries->getComponentPaths()); } /** * @expectedException FuzeWorks\Exception\LibraryException */ - public function testAddLibraryPathFail() + public function testAddComponentPathFail() { // First test if the library is not loaded yet - $this->assertFalse(class_exists('TestAddLibraryPathFail', false)); + $this->assertFalse(class_exists('TestAddComponentPathFail', false)); // Now test if the library can be loaded (hint: it can not) - $this->libraries->get('TestAddLibraryPathFail'); + $this->libraries->get('TestAddComponentPathFail'); } /** - * @depends testAddLibraryPathFail + * @depends testAddComponentPathFail */ - public function testAddLibraryPath() + public function testAddComponentPath() { - // Add the libraryPath - $this->libraries->removeLibraryPath('test'.DS.'libraries'); - $this->libraries->addLibraryPath('test'.DS.'libraries'.DS.'TestAddLibraryPath'); + // Add the componentPath + $this->libraries->removeComponentPath('test'.DS.'libraries'); + $this->libraries->addComponentPath('test'.DS.'libraries'.DS.'TestAddComponentPath'); // And try to load it again - $this->assertInstanceOf('Application\Library\TestAddLibraryPath', $this->libraries->get('TestAddLibraryPath')); + $this->assertInstanceOf('Application\Library\TestAddComponentPath', $this->libraries->get('TestAddComponentPath')); } - public function testRemoveLibraryPath() + public function testRemoveComponentPath() { // Test if the path does NOT exist - $this->assertFalse(in_array('test'.DS.'libraries'.DS.'TestRemoveLibraryPath', $this->libraries->getLibraryPaths())); + $this->assertFalse(in_array('test'.DS.'libraries'.DS.'TestRemoveComponentPath', $this->libraries->getComponentPaths())); // Add it - $this->libraries->addLibraryPath('test'.DS.'libraries'.DS.'TestRemoveLibraryPath'); + $this->libraries->addComponentPath('test'.DS.'libraries'.DS.'TestRemoveComponentPath'); // Assert if it's there - $this->assertTrue(in_array('test'.DS.'libraries'.DS.'TestRemoveLibraryPath', $this->libraries->getLibraryPaths())); + $this->assertTrue(in_array('test'.DS.'libraries'.DS.'TestRemoveComponentPath', $this->libraries->getComponentPaths())); // Remove it - $this->libraries->removeLibraryPath('test'.DS.'libraries'.DS.'TestRemoveLibraryPath'); + $this->libraries->removeComponentPath('test'.DS.'libraries'.DS.'TestRemoveComponentPath'); // And test if it's gone again - $this->assertFalse(in_array('test'.DS.'libraries'.DS.'TestRemoveLibraryPath', $this->libraries->getLibraryPaths())); + $this->assertFalse(in_array('test'.DS.'libraries'.DS.'TestRemoveComponentPath', $this->libraries->getComponentPaths())); } /* ---------------------------------- Load library from directories ------------------- */ @@ -142,7 +142,7 @@ class libraryTest extends CoreTestAbstract public function testGetLibraryFromSubdirectory() { // Add test directory path - $this->libraries->addLibraryPath('test'.DS.'libraries'.DS.'TestGetLibraryFromSubdirectory'); + $this->libraries->addComponentPath('test'.DS.'libraries'.DS.'TestGetLibraryFromSubdirectory'); $this->assertInstanceOf('Application\Library\TestGetLibraryFromSubdirectory', $this->libraries->get('TestGetLibraryFromSubdirectory')); } diff --git a/test/core/core_pluginsTest.php b/test/core/core_pluginsTest.php index ae59442..f74c78a 100644 --- a/test/core/core_pluginsTest.php +++ b/test/core/core_pluginsTest.php @@ -54,7 +54,7 @@ class pluginTest extends CoreTestAbstract public function setUp() { $this->plugins = new Plugins(); - $this->plugins->addPluginPath('test'.DS.'plugins'); + $this->plugins->addComponentPath('test'.DS.'plugins'); $this->plugins->loadHeadersFromPluginPaths(); } @@ -175,15 +175,15 @@ class pluginTest extends CoreTestAbstract */ public function testRunInvalidDirectory() { - $this->plugins->addPluginPath('exists_not'); + $this->plugins->addComponentPath('exists_not'); $this->plugins->loadHeadersFromPluginPaths(); $this->plugins->get('testRunInvalidDirectory'); } - public function testAddPluginPath() + public function testAddComponentPath() { - // Add the pluginPath - $this->plugins->addPluginPath('test'.DS.'plugins'.DS.'TestAddPluginPath'); + // Add the componentPath + $this->plugins->addComponentPath('test'.DS.'plugins'.DS.'TestAddComponentPath'); // And try to load it again $this->plugins->loadHeadersFromPluginPaths(); @@ -191,24 +191,24 @@ class pluginTest extends CoreTestAbstract } /** - * @depends testAddPluginPath + * @depends testAddComponentPath */ - public function testRemovePluginPath() + public function testRemoveComponentPath() { // Test if the path does NOT exist - $this->assertFalse(in_array('test'.DS.'plugins'.DS.'testRemovePluginPath', $this->plugins->getPluginPaths())); + $this->assertFalse(in_array('test'.DS.'plugins'.DS.'testRemoveComponentPath', $this->plugins->getComponentPaths())); // Add it - $this->plugins->addPluginPath('test'.DS.'plugins'.DS.'testRemovePluginPath'); + $this->plugins->addComponentPath('test'.DS.'plugins'.DS.'testRemoveComponentPath'); // Assert if it's there - $this->assertTrue(in_array('test'.DS.'plugins'.DS.'testRemovePluginPath', $this->plugins->getPluginPaths())); + $this->assertTrue(in_array('test'.DS.'plugins'.DS.'testRemoveComponentPath', $this->plugins->getComponentPaths())); // Remove it - $this->plugins->removePluginPath('test'.DS.'plugins'.DS.'testRemovePluginPath'); + $this->plugins->removeComponentPath('test'.DS.'plugins'.DS.'testRemoveComponentPath'); // And test if it's gone again - $this->assertFalse(in_array('test'.DS.'plugins'.DS.'testRemovePluginPath', $this->plugins->getPluginPaths())); + $this->assertFalse(in_array('test'.DS.'plugins'.DS.'testRemoveComponentPath', $this->plugins->getComponentPaths())); } public function testSetDirectories() @@ -219,7 +219,7 @@ class pluginTest extends CoreTestAbstract $expected = [$appDir, 'test'.DS.'plugins', $directory]; $this->plugins->setDirectories([$directory]); - $this->assertEquals($expected, $this->plugins->getPluginPaths()); + $this->assertEquals($expected, $this->plugins->getComponentPaths()); } public function tearDown() diff --git a/test/helpers/TestAddHelperPath/TestAddHelperPath.php b/test/helpers/TestAddComponentPath/TestAddComponentPath.php similarity index 92% rename from test/helpers/TestAddHelperPath/TestAddHelperPath.php rename to test/helpers/TestAddComponentPath/TestAddComponentPath.php index 7e216df..39b0382 100644 --- a/test/helpers/TestAddHelperPath/TestAddHelperPath.php +++ b/test/helpers/TestAddComponentPath/TestAddComponentPath.php @@ -33,10 +33,10 @@ * * @version Version 1.2.0 */ -if ( ! function_exists('testAddHelperPathFunction')) +if ( ! function_exists('testAddComponentPathFunction')) { - function testAddHelperPathFunction($someParameter) + function testAddComponentPathFunction($someParameter) { return 'SomeResult'; } diff --git a/test/libraries/TestAddLibraryPath/TestAddLibraryPath.php b/test/libraries/TestAddComponentPath/TestAddComponentPath.php similarity index 98% rename from test/libraries/TestAddLibraryPath/TestAddLibraryPath.php rename to test/libraries/TestAddComponentPath/TestAddComponentPath.php index 2fe557f..16e3e94 100644 --- a/test/libraries/TestAddLibraryPath/TestAddLibraryPath.php +++ b/test/libraries/TestAddComponentPath/TestAddComponentPath.php @@ -35,6 +35,6 @@ */ namespace Application\Library; -class TestAddLibraryPath { +class TestAddComponentPath { } \ No newline at end of file diff --git a/test/plugins/TestAddPluginPath/ActualPlugin/ActualPlugin.php b/test/plugins/TestAddComponentPath/ActualPlugin/ActualPlugin.php similarity index 100% rename from test/plugins/TestAddPluginPath/ActualPlugin/ActualPlugin.php rename to test/plugins/TestAddComponentPath/ActualPlugin/ActualPlugin.php diff --git a/test/plugins/TestAddPluginPath/ActualPlugin/header.php b/test/plugins/TestAddComponentPath/ActualPlugin/header.php similarity index 100% rename from test/plugins/TestAddPluginPath/ActualPlugin/header.php rename to test/plugins/TestAddComponentPath/ActualPlugin/header.php