From ef149a953fad5db5335403cc1bc6135a6b81a0c5 Mon Sep 17 00:00:00 2001 From: Abel Hoogeveen Date: Sun, 23 Dec 2018 19:21:31 +0100 Subject: [PATCH] Moved 'tests' to 'test' folder to make consistent with other FuzeWorks projects. --- .gitlab-ci.yml | 6 ++--- .travis.yml | 2 +- .../application/Helpers/put_helpers_here | 0 .../application/Libraries/put_libraries_here | 0 .../application/Logs/put_logs_here | 0 .../application/Plugins/put_plugins_here | 0 {tests => test}/application/bootstrap.php | 0 {tests => test}/autoload.php | 0 {tests => test}/bootstrap.php | 0 .../testAddComponent/TestAddComponent.php | 0 .../TestAddComponentDirectory.php | 0 .../TestAddComponentFail.php | 0 .../config.testaddconfigpath.php | 0 .../config.testloadconfigintercept.php | 0 .../config.testsameconfigobject.php | 0 .../core/abstract.coreTestAbstract.php | 0 {tests => test}/core/core_configTest.php | 20 +++++++------- .../core/core_configuratorTest.php | 6 ++--- {tests => test}/core/core_coreTest.php | 0 .../core/core_eventPriorityTest.php | 0 {tests => test}/core/core_eventTest.php | 0 {tests => test}/core/core_eventsTest.php | 0 {tests => test}/core/core_exceptionTest.php | 0 {tests => test}/core/core_factoryTest.php | 0 {tests => test}/core/core_helperTest.php | 18 ++++++------- {tests => test}/core/core_libraryTest.php | 26 +++++++++---------- {tests => test}/core/core_loggerTest.php | 0 {tests => test}/core/core_pluginsTest.php | 20 +++++++------- .../events/event_coreStartEventTest.php | 0 .../events/event_pluginGetEventTest.php | 0 .../testAddHelperPath/testAddHelperPath.php | 0 .../testCancelLoadHelper.php | 0 .../helpers/testGetHelper/testGetHelper.php | 0 .../helpers/testLoadHelper/testLoadHelper.php | 0 .../testLoadHelperWithoutSubdirectory.php | 0 .../testReloadHelper/testReloadHelper.php | 0 .../TestAddLibraryClass.php | 0 .../testAddLibraryPath/TestAddLibraryPath.php | 0 .../TestGetLibraryFromAltDirectory.php | 0 .../TestGetLibraryFromDirectory.php | 0 .../TestGetLibraryFromSubdirectory.php | 0 .../TestGetLibraryNoClass.php | 0 .../TestGetLibraryParametersFromConfig.php | 0 ...fig.testgetlibraryparametersfromconfig.php | 0 {tests => test}/mocks/autoloader.php | 0 {tests => test}/phpunit.xml | 0 .../ActualPlugin/ActualPlugin.php | 0 .../testAddPluginPath/ActualPlugin/header.php | 0 .../testDisabledPlugin/TestInvalidClass.php | 0 .../plugins/testDisabledPlugin/header.php | 0 .../plugins/testGetPluginMethod/header.php | 0 .../OtherPlugFile.php | 0 .../testGetPluginWithClassFile/header.php | 0 .../testInvalidClass/TestInvalidClass.php | 0 .../plugins/testInvalidClass/header.php | 0 .../testLoadHeader/loadHeader/Plug.php | 0 .../testLoadHeader/loadHeader/header.php | 0 .../TestLoadPlugin.php | 0 .../testLoadHeaderNotIPluginHeader/header.php | 0 .../plugins/testLoadPlugin/TestLoadPlugin.php | 0 .../plugins/testLoadPlugin/header.php | 0 .../testMissingHeader/TestMissingHeader.php | 0 .../plugins/testMissingPlugin/header.php | 0 .../testReloadPlugin/TestReloadPlugin.php | 0 .../plugins/testReloadPlugin/header.php | 0 {tests => test}/temp/.gitignore | 0 66 files changed, 49 insertions(+), 49 deletions(-) rename {tests => test}/application/Helpers/put_helpers_here (100%) rename {tests => test}/application/Libraries/put_libraries_here (100%) rename {tests => test}/application/Logs/put_logs_here (100%) rename {tests => test}/application/Plugins/put_plugins_here (100%) rename {tests => test}/application/bootstrap.php (100%) rename {tests => test}/autoload.php (100%) rename {tests => test}/bootstrap.php (100%) rename {tests => test}/components/testAddComponent/TestAddComponent.php (100%) rename {tests => test}/components/testAddComponentDirectory/TestAddComponentDirectory.php (100%) rename {tests => test}/components/testAddComponentFail/TestAddComponentFail.php (100%) rename {tests => test}/config/testAddConfigPath/config.testaddconfigpath.php (100%) rename {tests => test}/config/testLoadConfigIntercept/config.testloadconfigintercept.php (100%) rename {tests => test}/config/testSameConfigObject/config.testsameconfigobject.php (100%) rename {tests => test}/core/abstract.coreTestAbstract.php (100%) rename {tests => test}/core/core_configTest.php (86%) rename {tests => test}/core/core_configuratorTest.php (97%) rename {tests => test}/core/core_coreTest.php (100%) rename {tests => test}/core/core_eventPriorityTest.php (100%) rename {tests => test}/core/core_eventTest.php (100%) rename {tests => test}/core/core_eventsTest.php (100%) rename {tests => test}/core/core_exceptionTest.php (100%) rename {tests => test}/core/core_factoryTest.php (100%) rename {tests => test}/core/core_helperTest.php (90%) rename {tests => test}/core/core_libraryTest.php (84%) rename {tests => test}/core/core_loggerTest.php (100%) rename {tests => test}/core/core_pluginsTest.php (87%) rename {tests => test}/events/event_coreStartEventTest.php (100%) rename {tests => test}/events/event_pluginGetEventTest.php (100%) rename {tests => test}/helpers/testAddHelperPath/testAddHelperPath.php (100%) rename {tests => test}/helpers/testCancelLoadHelper/testCancelLoadHelper.php (100%) rename {tests => test}/helpers/testGetHelper/testGetHelper.php (100%) rename {tests => test}/helpers/testLoadHelper/testLoadHelper.php (100%) rename {tests => test}/helpers/testLoadHelperWithoutSubdirectory.php (100%) rename {tests => test}/helpers/testReloadHelper/testReloadHelper.php (100%) rename {tests => test}/libraries/testAddLibraryClass/TestAddLibraryClass.php (100%) rename {tests => test}/libraries/testAddLibraryPath/TestAddLibraryPath.php (100%) rename {tests => test}/libraries/testGetLibraryFromAltDirectory/TestGetLibraryFromAltDirectory.php (100%) rename {tests => test}/libraries/testGetLibraryFromDirectory/TestGetLibraryFromDirectory.php (100%) rename {tests => test}/libraries/testGetLibraryFromSubdirectory/TestGetLibraryFromSubdirectory/TestGetLibraryFromSubdirectory.php (100%) rename {tests => test}/libraries/testGetLibraryNoClass/TestGetLibraryNoClass.php (100%) rename {tests => test}/libraries/testGetLibraryParametersFromConfig/TestGetLibraryParametersFromConfig.php (100%) rename {tests => test}/libraries/testGetLibraryParametersFromConfig/config.testgetlibraryparametersfromconfig.php (100%) rename {tests => test}/mocks/autoloader.php (100%) rename {tests => test}/phpunit.xml (100%) rename {tests => test}/plugins/testAddPluginPath/ActualPlugin/ActualPlugin.php (100%) rename {tests => test}/plugins/testAddPluginPath/ActualPlugin/header.php (100%) rename {tests => test}/plugins/testDisabledPlugin/TestInvalidClass.php (100%) rename {tests => test}/plugins/testDisabledPlugin/header.php (100%) rename {tests => test}/plugins/testGetPluginMethod/header.php (100%) rename {tests => test}/plugins/testGetPluginWithClassFile/OtherPlugFile.php (100%) rename {tests => test}/plugins/testGetPluginWithClassFile/header.php (100%) rename {tests => test}/plugins/testInvalidClass/TestInvalidClass.php (100%) rename {tests => test}/plugins/testInvalidClass/header.php (100%) rename {tests => test}/plugins/testLoadHeader/loadHeader/Plug.php (100%) rename {tests => test}/plugins/testLoadHeader/loadHeader/header.php (100%) rename {tests => test}/plugins/testLoadHeaderNotIPluginHeader/TestLoadPlugin.php (100%) rename {tests => test}/plugins/testLoadHeaderNotIPluginHeader/header.php (100%) rename {tests => test}/plugins/testLoadPlugin/TestLoadPlugin.php (100%) rename {tests => test}/plugins/testLoadPlugin/header.php (100%) rename {tests => test}/plugins/testMissingHeader/TestMissingHeader.php (100%) rename {tests => test}/plugins/testMissingPlugin/header.php (100%) rename {tests => test}/plugins/testReloadPlugin/TestReloadPlugin.php (100%) rename {tests => test}/plugins/testReloadPlugin/header.php (100%) rename {tests => test}/temp/.gitignore (100%) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fd6a0da..c87585e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,7 +22,7 @@ test:7.1: stage: test image: php:7.1 script: - - vendor/bin/phpunit -c tests/phpunit.xml --coverage-text + - vendor/bin/phpunit -c test/phpunit.xml --coverage-text cache: key: "$CI_BUILD_REF_$CI_BUILD_REF_NAME" paths: @@ -32,7 +32,7 @@ test:7.2: stage: test image: php:7.2 script: - - vendor/bin/phpunit -c tests/phpunit.xml --coverage-text + - vendor/bin/phpunit -c test/phpunit.xml --coverage-text cache: key: "$CI_BUILD_REF_$CI_BUILD_REF_NAME" paths: @@ -44,7 +44,7 @@ release: only: - master script: - - vendor/bin/phpunit -c tests/phpunit.xml --coverage-text + - vendor/bin/phpunit -c test/phpunit.xml --coverage-text artifacts: name: "${CI_BUILD_NAME}_${CI_BUILD_REF_NAME}" paths: diff --git a/.travis.yml b/.travis.yml index ec2a8ae..06efada 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ php: - 7 script: - - php vendor/bin/phpunit -v -c tests/phpunit.xml --coverage-text + - php vendor/bin/phpunit -v -c test/phpunit.xml --coverage-text before_script: - composer install diff --git a/tests/application/Helpers/put_helpers_here b/test/application/Helpers/put_helpers_here similarity index 100% rename from tests/application/Helpers/put_helpers_here rename to test/application/Helpers/put_helpers_here diff --git a/tests/application/Libraries/put_libraries_here b/test/application/Libraries/put_libraries_here similarity index 100% rename from tests/application/Libraries/put_libraries_here rename to test/application/Libraries/put_libraries_here diff --git a/tests/application/Logs/put_logs_here b/test/application/Logs/put_logs_here similarity index 100% rename from tests/application/Logs/put_logs_here rename to test/application/Logs/put_logs_here diff --git a/tests/application/Plugins/put_plugins_here b/test/application/Plugins/put_plugins_here similarity index 100% rename from tests/application/Plugins/put_plugins_here rename to test/application/Plugins/put_plugins_here diff --git a/tests/application/bootstrap.php b/test/application/bootstrap.php similarity index 100% rename from tests/application/bootstrap.php rename to test/application/bootstrap.php diff --git a/tests/autoload.php b/test/autoload.php similarity index 100% rename from tests/autoload.php rename to test/autoload.php diff --git a/tests/bootstrap.php b/test/bootstrap.php similarity index 100% rename from tests/bootstrap.php rename to test/bootstrap.php diff --git a/tests/components/testAddComponent/TestAddComponent.php b/test/components/testAddComponent/TestAddComponent.php similarity index 100% rename from tests/components/testAddComponent/TestAddComponent.php rename to test/components/testAddComponent/TestAddComponent.php diff --git a/tests/components/testAddComponentDirectory/TestAddComponentDirectory.php b/test/components/testAddComponentDirectory/TestAddComponentDirectory.php similarity index 100% rename from tests/components/testAddComponentDirectory/TestAddComponentDirectory.php rename to test/components/testAddComponentDirectory/TestAddComponentDirectory.php diff --git a/tests/components/testAddComponentFail/TestAddComponentFail.php b/test/components/testAddComponentFail/TestAddComponentFail.php similarity index 100% rename from tests/components/testAddComponentFail/TestAddComponentFail.php rename to test/components/testAddComponentFail/TestAddComponentFail.php diff --git a/tests/config/testAddConfigPath/config.testaddconfigpath.php b/test/config/testAddConfigPath/config.testaddconfigpath.php similarity index 100% rename from tests/config/testAddConfigPath/config.testaddconfigpath.php rename to test/config/testAddConfigPath/config.testaddconfigpath.php diff --git a/tests/config/testLoadConfigIntercept/config.testloadconfigintercept.php b/test/config/testLoadConfigIntercept/config.testloadconfigintercept.php similarity index 100% rename from tests/config/testLoadConfigIntercept/config.testloadconfigintercept.php rename to test/config/testLoadConfigIntercept/config.testloadconfigintercept.php diff --git a/tests/config/testSameConfigObject/config.testsameconfigobject.php b/test/config/testSameConfigObject/config.testsameconfigobject.php similarity index 100% rename from tests/config/testSameConfigObject/config.testsameconfigobject.php rename to test/config/testSameConfigObject/config.testsameconfigobject.php diff --git a/tests/core/abstract.coreTestAbstract.php b/test/core/abstract.coreTestAbstract.php similarity index 100% rename from tests/core/abstract.coreTestAbstract.php rename to test/core/abstract.coreTestAbstract.php diff --git a/tests/core/core_configTest.php b/test/core/core_configTest.php similarity index 86% rename from tests/core/core_configTest.php rename to test/core/core_configTest.php index 8df4250..56c3123 100644 --- a/tests/core/core_configTest.php +++ b/test/core/core_configTest.php @@ -107,7 +107,7 @@ class configTest extends CoreTestAbstract }, 'configGetEvent', EventPriority::NORMAL); // Load file - $config = $this->config->getConfig('does_not_exist', ['tests'.DS.'config'.DS.'testLoadConfigIntercept']); + $config = $this->config->getConfig('does_not_exist', ['test'.DS.'config'.DS.'testLoadConfigIntercept']); $this->assertEquals('exists', $config->it); } @@ -126,7 +126,7 @@ class configTest extends CoreTestAbstract public function testAddConfigPath() { // Add the configPath - $this->config->addConfigPath('tests'.DS.'config'.DS.'testAddConfigPath'); + $this->config->addConfigPath('test'.DS.'config'.DS.'testAddConfigPath'); // And try to load it again $this->assertInstanceOf('FuzeWorks\ConfigORM\ConfigORM', $this->config->getConfig('testAddConfigPath')); @@ -135,25 +135,25 @@ class configTest extends CoreTestAbstract public function testRemoveConfigPath() { // Test if the path does NOT exist - $this->assertFalse(in_array('tests'.DS.'config'.DS.'testRemoveConfigPath', $this->config->getConfigPaths())); + $this->assertFalse(in_array('test'.DS.'config'.DS.'testRemoveConfigPath', $this->config->getConfigPaths())); // Add it - $this->config->addConfigPath('tests'.DS.'config'.DS.'testRemoveConfigPath'); + $this->config->addConfigPath('test'.DS.'config'.DS.'testRemoveConfigPath'); // Assert if it's there - $this->assertTrue(in_array('tests'.DS.'config'.DS.'testRemoveConfigPath', $this->config->getConfigPaths())); + $this->assertTrue(in_array('test'.DS.'config'.DS.'testRemoveConfigPath', $this->config->getConfigPaths())); // Remove it - $this->config->removeConfigPath('tests'.DS.'config'.DS.'testRemoveConfigPath'); + $this->config->removeConfigPath('test'.DS.'config'.DS.'testRemoveConfigPath'); // And test if it's gone again - $this->assertFalse(in_array('tests'.DS.'config'.DS.'testRemoveConfigPath', $this->config->getConfigPaths())); + $this->assertFalse(in_array('test'.DS.'config'.DS.'testRemoveConfigPath', $this->config->getConfigPaths())); } public function testSameConfigObject() { - $config = $this->config->getConfig('testsameconfigobject', array('tests'.DS.'config'.DS.'testSameConfigObject')); - $config2 = $this->config->getConfig('testsameconfigobject', array('tests'.DS.'config'.DS.'testSameConfigObject')); + $config = $this->config->getConfig('testsameconfigobject', array('test'.DS.'config'.DS.'testSameConfigObject')); + $config2 = $this->config->getConfig('testsameconfigobject', array('test'.DS.'config'.DS.'testSameConfigObject')); // First test if the objects are the same instance $this->assertSame($config, $config2); @@ -169,7 +169,7 @@ class configTest extends CoreTestAbstract public function testSetDirectories() { // Add the directory - $directory = 'tests' . DS . 'config'; + $directory = 'test' . DS . 'config'; $this->config->setDirectories([$directory]); // Assert expectations diff --git a/tests/core/core_configuratorTest.php b/test/core/core_configuratorTest.php similarity index 97% rename from tests/core/core_configuratorTest.php rename to test/core/core_configuratorTest.php index c362ebd..8496c6b 100644 --- a/tests/core/core_configuratorTest.php +++ b/test/core/core_configuratorTest.php @@ -84,7 +84,7 @@ class configuratorTest extends CoreTestAbstract public function testAddComponent() { // Load the component - require_once 'tests'.DS.'components'.DS.'testAddComponent'.DS.'TestAddComponent.php'; + require_once 'test'.DS.'components'.DS.'testAddComponent'.DS.'TestAddComponent.php'; $component = new FuzeWorks\Component\TestComponent(); $this->assertInstanceOf('FuzeWorks\Configurator', $this->configurator->addComponent($component)); @@ -102,7 +102,7 @@ class configuratorTest extends CoreTestAbstract public function testAddComponentFail() { // Load the component - require_once 'tests'.DS.'components'.DS.'testAddComponentFail'.DS.'TestAddComponentFail.php'; + require_once 'test'.DS.'components'.DS.'testAddComponentFail'.DS.'TestAddComponentFail.php'; $component = new FuzeWorks\Component\TestAddComponentFailComponent; $this->configurator->addComponent($component); @@ -197,7 +197,7 @@ class configuratorTest extends CoreTestAbstract vfsStream::setup('testAddComponentDirectory'); // Add the component - require_once 'tests'.DS.'components'.DS.'testAddComponentDirectory'.DS.'TestAddComponentDirectory.php'; + require_once 'test'.DS.'components'.DS.'testAddComponentDirectory'.DS.'TestAddComponentDirectory.php'; $component = new FuzeWorks\Component\TestAddComponentDirectoryComponent(); $this->configurator->addComponent($component); diff --git a/tests/core/core_coreTest.php b/test/core/core_coreTest.php similarity index 100% rename from tests/core/core_coreTest.php rename to test/core/core_coreTest.php diff --git a/tests/core/core_eventPriorityTest.php b/test/core/core_eventPriorityTest.php similarity index 100% rename from tests/core/core_eventPriorityTest.php rename to test/core/core_eventPriorityTest.php diff --git a/tests/core/core_eventTest.php b/test/core/core_eventTest.php similarity index 100% rename from tests/core/core_eventTest.php rename to test/core/core_eventTest.php diff --git a/tests/core/core_eventsTest.php b/test/core/core_eventsTest.php similarity index 100% rename from tests/core/core_eventsTest.php rename to test/core/core_eventsTest.php diff --git a/tests/core/core_exceptionTest.php b/test/core/core_exceptionTest.php similarity index 100% rename from tests/core/core_exceptionTest.php rename to test/core/core_exceptionTest.php diff --git a/tests/core/core_factoryTest.php b/test/core/core_factoryTest.php similarity index 100% rename from tests/core/core_factoryTest.php rename to test/core/core_factoryTest.php diff --git a/tests/core/core_helperTest.php b/test/core/core_helperTest.php similarity index 90% rename from tests/core/core_helperTest.php rename to test/core/core_helperTest.php index 4d80a03..411630c 100644 --- a/tests/core/core_helperTest.php +++ b/test/core/core_helperTest.php @@ -55,7 +55,7 @@ class helperTest extends CoreTestAbstract { // Prepare class $this->helpers = new Helpers(); - $this->helpers->setDirectories(['tests' . DS . 'helpers']); + $this->helpers->setDirectories(['test' . DS . 'helpers']); } public function testGetHelpersClass() @@ -171,7 +171,7 @@ class helperTest extends CoreTestAbstract public function testAddHelperPath() { // Add the helperPath - $this->helpers->addHelperPath('tests'.DS.'helpers'.DS.'testAddHelperPath'); + $this->helpers->addHelperPath('test'.DS.'helpers'.DS.'testAddHelperPath'); // And try to load it again $this->assertTrue($this->helpers->load('testAddHelperPath')); @@ -187,19 +187,19 @@ class helperTest extends CoreTestAbstract public function testRemoveHelperPath() { // Test if the path does NOT exist - $this->assertFalse(in_array('tests'.DS.'helpers'.DS.'testRemoveHelperPath', $this->helpers->getHelperPaths())); + $this->assertFalse(in_array('test'.DS.'helpers'.DS.'testRemoveHelperPath', $this->helpers->getHelperPaths())); // Add it - $this->helpers->addHelperPath('tests'.DS.'helpers'.DS.'testRemoveHelperPath'); + $this->helpers->addHelperPath('test'.DS.'helpers'.DS.'testRemoveHelperPath'); // Assert if it's there - $this->assertTrue(in_array('tests'.DS.'helpers'.DS.'testRemoveHelperPath', $this->helpers->getHelperPaths())); + $this->assertTrue(in_array('test'.DS.'helpers'.DS.'testRemoveHelperPath', $this->helpers->getHelperPaths())); // Remove it - $this->helpers->removeHelperPath('tests'.DS.'helpers'.DS.'testRemoveHelperPath'); + $this->helpers->removeHelperPath('test'.DS.'helpers'.DS.'testRemoveHelperPath'); // And test if it's gone again - $this->assertFalse(in_array('tests'.DS.'helpers'.DS.'testRemoveHelperPath', $this->helpers->getHelperPaths())); + $this->assertFalse(in_array('test'.DS.'helpers'.DS.'testRemoveHelperPath', $this->helpers->getHelperPaths())); } /** @@ -209,11 +209,11 @@ class helperTest extends CoreTestAbstract public function testSetDirectories() { // Add the directory - $directory = 'tests' . DS . 'helpers'; + $directory = 'test' . DS . 'helpers'; $this->helpers->setDirectories([$directory]); // Assert expectations - $expected = array_merge(\FuzeWorks\Core::$appDirs, ['tests' . DS . 'helpers', $directory]); + $expected = array_merge(\FuzeWorks\Core::$appDirs, ['test' . DS . 'helpers', $directory]); $this->assertEquals($expected, $this->helpers->getHelperPaths()); } } diff --git a/tests/core/core_libraryTest.php b/test/core/core_libraryTest.php similarity index 84% rename from tests/core/core_libraryTest.php rename to test/core/core_libraryTest.php index 8d7fca9..ed522d8 100644 --- a/tests/core/core_libraryTest.php +++ b/test/core/core_libraryTest.php @@ -57,7 +57,7 @@ class libraryTest extends CoreTestAbstract $this->libraries = new Libraries(); // And then set all paths - $this->libraries->setDirectories(['tests'.DS.'libraries']); + $this->libraries->setDirectories(['test'.DS.'libraries']); } public function testLibrariesClass() @@ -73,7 +73,7 @@ class libraryTest extends CoreTestAbstract public function testSetDirectories() { // Test initial - $initial = array_merge(Core::$appDirs, ['tests'.DS.'libraries']); + $initial = array_merge(Core::$appDirs, ['test'.DS.'libraries']); $this->assertEquals($initial, $this->libraries->getLibraryPaths()); // Add path @@ -101,8 +101,8 @@ class libraryTest extends CoreTestAbstract public function testAddLibraryPath() { // Add the libraryPath - $this->libraries->removeLibraryPath('tests'.DS.'libraries'); - $this->libraries->addLibraryPath('tests'.DS.'libraries'.DS.'testAddLibraryPath'); + $this->libraries->removeLibraryPath('test'.DS.'libraries'); + $this->libraries->addLibraryPath('test'.DS.'libraries'.DS.'testAddLibraryPath'); // And try to load it again $this->assertInstanceOf('Application\Library\TestAddLibraryPath', $this->libraries->get('TestAddLibraryPath')); @@ -111,19 +111,19 @@ class libraryTest extends CoreTestAbstract public function testRemoveLibraryPath() { // Test if the path does NOT exist - $this->assertFalse(in_array('tests'.DS.'libraries'.DS.'testRemoveLibraryPath', $this->libraries->getLibraryPaths())); + $this->assertFalse(in_array('test'.DS.'libraries'.DS.'testRemoveLibraryPath', $this->libraries->getLibraryPaths())); // Add it - $this->libraries->addLibraryPath('tests'.DS.'libraries'.DS.'testRemoveLibraryPath'); + $this->libraries->addLibraryPath('test'.DS.'libraries'.DS.'testRemoveLibraryPath'); // Assert if it's there - $this->assertTrue(in_array('tests'.DS.'libraries'.DS.'testRemoveLibraryPath', $this->libraries->getLibraryPaths())); + $this->assertTrue(in_array('test'.DS.'libraries'.DS.'testRemoveLibraryPath', $this->libraries->getLibraryPaths())); // Remove it - $this->libraries->removeLibraryPath('tests'.DS.'libraries'.DS.'testRemoveLibraryPath'); + $this->libraries->removeLibraryPath('test'.DS.'libraries'.DS.'testRemoveLibraryPath'); // And test if it's gone again - $this->assertFalse(in_array('tests'.DS.'libraries'.DS.'testRemoveLibraryPath', $this->libraries->getLibraryPaths())); + $this->assertFalse(in_array('test'.DS.'libraries'.DS.'testRemoveLibraryPath', $this->libraries->getLibraryPaths())); } /* ---------------------------------- Load library from directories ------------------- */ @@ -142,7 +142,7 @@ class libraryTest extends CoreTestAbstract public function testGetLibraryFromSubdirectory() { // Add test directory path - $this->libraries->addLibraryPath('tests'.DS.'libraries'.DS.'testGetLibraryFromSubdirectory'); + $this->libraries->addLibraryPath('test'.DS.'libraries'.DS.'testGetLibraryFromSubdirectory'); $this->assertInstanceOf('Application\Library\TestGetLibraryFromSubdirectory', $this->libraries->get('TestGetLibraryFromSubdirectory')); } @@ -154,7 +154,7 @@ class libraryTest extends CoreTestAbstract { // Simple test of loading a library and checking if it exists $this->assertInstanceOf('Application\Library\TestGetLibraryFromAltDirectory', - $this->libraries->get('TestGetLibraryFromAltDirectory', [], ['tests'.DS.'libraries'.DS.'testGetLibraryFromAltDirectory'])); + $this->libraries->get('TestGetLibraryFromAltDirectory', [], ['test'.DS.'libraries'.DS.'testGetLibraryFromAltDirectory'])); } /** @@ -185,7 +185,7 @@ class libraryTest extends CoreTestAbstract { // Prepare the config file $libraryName = 'TestGetLibraryParametersFromConfig'; - $libraryDir = 'tests'.DS.'libraries'.DS.'testGetLibraryParametersFromConfig'; + $libraryDir = 'test'.DS.'libraries'.DS.'testGetLibraryParametersFromConfig'; $config = Factory::getInstance()->config->getConfig(strtolower($libraryName), [$libraryDir]); // Load the library @@ -207,7 +207,7 @@ class libraryTest extends CoreTestAbstract public function testAddLibraryClass() { - require_once('tests'.DS.'libraries'.DS.'testAddLibraryClass'.DS.'TestAddLibraryClass.php'); + require_once('test'.DS.'libraries'.DS.'testAddLibraryClass'.DS.'TestAddLibraryClass.php'); $this->libraries->addLibraryClass('LibraryClass', '\Custom\Spaces\TestAddLibraryClass'); diff --git a/tests/core/core_loggerTest.php b/test/core/core_loggerTest.php similarity index 100% rename from tests/core/core_loggerTest.php rename to test/core/core_loggerTest.php diff --git a/tests/core/core_pluginsTest.php b/test/core/core_pluginsTest.php similarity index 87% rename from tests/core/core_pluginsTest.php rename to test/core/core_pluginsTest.php index 1e10d23..f381698 100644 --- a/tests/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('tests'.DS.'plugins'); + $this->plugins->addPluginPath('test'.DS.'plugins'); $this->plugins->loadHeadersFromPluginPaths(); } @@ -85,7 +85,7 @@ class pluginTest extends CoreTestAbstract public function testLoadHeader() { // Load the header object - require_once('tests' . DS . 'plugins' . DS . 'testLoadHeader'.DS.'loadHeader'.DS.'header.php'); + require_once('test' . DS . 'plugins' . DS . 'testLoadHeader'.DS.'loadHeader'.DS.'header.php'); $header = new Plugins\TestLoadHeaderHeader(); // Register the header object @@ -183,7 +183,7 @@ class pluginTest extends CoreTestAbstract public function testAddPluginPath() { // Add the pluginPath - $this->plugins->addPluginPath('tests'.DS.'plugins'.DS.'testAddPluginPath'); + $this->plugins->addPluginPath('test'.DS.'plugins'.DS.'testAddPluginPath'); // And try to load it again $this->plugins->loadHeadersFromPluginPaths(); @@ -196,27 +196,27 @@ class pluginTest extends CoreTestAbstract public function testRemovePluginPath() { // Test if the path does NOT exist - $this->assertFalse(in_array('tests'.DS.'plugins'.DS.'testRemovePluginPath', $this->plugins->getPluginPaths())); + $this->assertFalse(in_array('test'.DS.'plugins'.DS.'testRemovePluginPath', $this->plugins->getPluginPaths())); // Add it - $this->plugins->addPluginPath('tests'.DS.'plugins'.DS.'testRemovePluginPath'); + $this->plugins->addPluginPath('test'.DS.'plugins'.DS.'testRemovePluginPath'); // Assert if it's there - $this->assertTrue(in_array('tests'.DS.'plugins'.DS.'testRemovePluginPath', $this->plugins->getPluginPaths())); + $this->assertTrue(in_array('test'.DS.'plugins'.DS.'testRemovePluginPath', $this->plugins->getPluginPaths())); // Remove it - $this->plugins->removePluginPath('tests'.DS.'plugins'.DS.'testRemovePluginPath'); + $this->plugins->removePluginPath('test'.DS.'plugins'.DS.'testRemovePluginPath'); // And test if it's gone again - $this->assertFalse(in_array('tests'.DS.'plugins'.DS.'testRemovePluginPath', $this->plugins->getPluginPaths())); + $this->assertFalse(in_array('test'.DS.'plugins'.DS.'testRemovePluginPath', $this->plugins->getPluginPaths())); } public function testSetDirectories() { // Add the directory $appDir = Core::$appDirs[0]; - $directory = 'tests' . DS . 'helpers'; - $expected = [$appDir, 'tests'.DS.'plugins', $directory]; + $directory = 'test' . DS . 'helpers'; + $expected = [$appDir, 'test'.DS.'plugins', $directory]; $this->plugins->setDirectories([$directory]); $this->assertEquals($expected, $this->plugins->getPluginPaths()); diff --git a/tests/events/event_coreStartEventTest.php b/test/events/event_coreStartEventTest.php similarity index 100% rename from tests/events/event_coreStartEventTest.php rename to test/events/event_coreStartEventTest.php diff --git a/tests/events/event_pluginGetEventTest.php b/test/events/event_pluginGetEventTest.php similarity index 100% rename from tests/events/event_pluginGetEventTest.php rename to test/events/event_pluginGetEventTest.php diff --git a/tests/helpers/testAddHelperPath/testAddHelperPath.php b/test/helpers/testAddHelperPath/testAddHelperPath.php similarity index 100% rename from tests/helpers/testAddHelperPath/testAddHelperPath.php rename to test/helpers/testAddHelperPath/testAddHelperPath.php diff --git a/tests/helpers/testCancelLoadHelper/testCancelLoadHelper.php b/test/helpers/testCancelLoadHelper/testCancelLoadHelper.php similarity index 100% rename from tests/helpers/testCancelLoadHelper/testCancelLoadHelper.php rename to test/helpers/testCancelLoadHelper/testCancelLoadHelper.php diff --git a/tests/helpers/testGetHelper/testGetHelper.php b/test/helpers/testGetHelper/testGetHelper.php similarity index 100% rename from tests/helpers/testGetHelper/testGetHelper.php rename to test/helpers/testGetHelper/testGetHelper.php diff --git a/tests/helpers/testLoadHelper/testLoadHelper.php b/test/helpers/testLoadHelper/testLoadHelper.php similarity index 100% rename from tests/helpers/testLoadHelper/testLoadHelper.php rename to test/helpers/testLoadHelper/testLoadHelper.php diff --git a/tests/helpers/testLoadHelperWithoutSubdirectory.php b/test/helpers/testLoadHelperWithoutSubdirectory.php similarity index 100% rename from tests/helpers/testLoadHelperWithoutSubdirectory.php rename to test/helpers/testLoadHelperWithoutSubdirectory.php diff --git a/tests/helpers/testReloadHelper/testReloadHelper.php b/test/helpers/testReloadHelper/testReloadHelper.php similarity index 100% rename from tests/helpers/testReloadHelper/testReloadHelper.php rename to test/helpers/testReloadHelper/testReloadHelper.php diff --git a/tests/libraries/testAddLibraryClass/TestAddLibraryClass.php b/test/libraries/testAddLibraryClass/TestAddLibraryClass.php similarity index 100% rename from tests/libraries/testAddLibraryClass/TestAddLibraryClass.php rename to test/libraries/testAddLibraryClass/TestAddLibraryClass.php diff --git a/tests/libraries/testAddLibraryPath/TestAddLibraryPath.php b/test/libraries/testAddLibraryPath/TestAddLibraryPath.php similarity index 100% rename from tests/libraries/testAddLibraryPath/TestAddLibraryPath.php rename to test/libraries/testAddLibraryPath/TestAddLibraryPath.php diff --git a/tests/libraries/testGetLibraryFromAltDirectory/TestGetLibraryFromAltDirectory.php b/test/libraries/testGetLibraryFromAltDirectory/TestGetLibraryFromAltDirectory.php similarity index 100% rename from tests/libraries/testGetLibraryFromAltDirectory/TestGetLibraryFromAltDirectory.php rename to test/libraries/testGetLibraryFromAltDirectory/TestGetLibraryFromAltDirectory.php diff --git a/tests/libraries/testGetLibraryFromDirectory/TestGetLibraryFromDirectory.php b/test/libraries/testGetLibraryFromDirectory/TestGetLibraryFromDirectory.php similarity index 100% rename from tests/libraries/testGetLibraryFromDirectory/TestGetLibraryFromDirectory.php rename to test/libraries/testGetLibraryFromDirectory/TestGetLibraryFromDirectory.php diff --git a/tests/libraries/testGetLibraryFromSubdirectory/TestGetLibraryFromSubdirectory/TestGetLibraryFromSubdirectory.php b/test/libraries/testGetLibraryFromSubdirectory/TestGetLibraryFromSubdirectory/TestGetLibraryFromSubdirectory.php similarity index 100% rename from tests/libraries/testGetLibraryFromSubdirectory/TestGetLibraryFromSubdirectory/TestGetLibraryFromSubdirectory.php rename to test/libraries/testGetLibraryFromSubdirectory/TestGetLibraryFromSubdirectory/TestGetLibraryFromSubdirectory.php diff --git a/tests/libraries/testGetLibraryNoClass/TestGetLibraryNoClass.php b/test/libraries/testGetLibraryNoClass/TestGetLibraryNoClass.php similarity index 100% rename from tests/libraries/testGetLibraryNoClass/TestGetLibraryNoClass.php rename to test/libraries/testGetLibraryNoClass/TestGetLibraryNoClass.php diff --git a/tests/libraries/testGetLibraryParametersFromConfig/TestGetLibraryParametersFromConfig.php b/test/libraries/testGetLibraryParametersFromConfig/TestGetLibraryParametersFromConfig.php similarity index 100% rename from tests/libraries/testGetLibraryParametersFromConfig/TestGetLibraryParametersFromConfig.php rename to test/libraries/testGetLibraryParametersFromConfig/TestGetLibraryParametersFromConfig.php diff --git a/tests/libraries/testGetLibraryParametersFromConfig/config.testgetlibraryparametersfromconfig.php b/test/libraries/testGetLibraryParametersFromConfig/config.testgetlibraryparametersfromconfig.php similarity index 100% rename from tests/libraries/testGetLibraryParametersFromConfig/config.testgetlibraryparametersfromconfig.php rename to test/libraries/testGetLibraryParametersFromConfig/config.testgetlibraryparametersfromconfig.php diff --git a/tests/mocks/autoloader.php b/test/mocks/autoloader.php similarity index 100% rename from tests/mocks/autoloader.php rename to test/mocks/autoloader.php diff --git a/tests/phpunit.xml b/test/phpunit.xml similarity index 100% rename from tests/phpunit.xml rename to test/phpunit.xml diff --git a/tests/plugins/testAddPluginPath/ActualPlugin/ActualPlugin.php b/test/plugins/testAddPluginPath/ActualPlugin/ActualPlugin.php similarity index 100% rename from tests/plugins/testAddPluginPath/ActualPlugin/ActualPlugin.php rename to test/plugins/testAddPluginPath/ActualPlugin/ActualPlugin.php diff --git a/tests/plugins/testAddPluginPath/ActualPlugin/header.php b/test/plugins/testAddPluginPath/ActualPlugin/header.php similarity index 100% rename from tests/plugins/testAddPluginPath/ActualPlugin/header.php rename to test/plugins/testAddPluginPath/ActualPlugin/header.php diff --git a/tests/plugins/testDisabledPlugin/TestInvalidClass.php b/test/plugins/testDisabledPlugin/TestInvalidClass.php similarity index 100% rename from tests/plugins/testDisabledPlugin/TestInvalidClass.php rename to test/plugins/testDisabledPlugin/TestInvalidClass.php diff --git a/tests/plugins/testDisabledPlugin/header.php b/test/plugins/testDisabledPlugin/header.php similarity index 100% rename from tests/plugins/testDisabledPlugin/header.php rename to test/plugins/testDisabledPlugin/header.php diff --git a/tests/plugins/testGetPluginMethod/header.php b/test/plugins/testGetPluginMethod/header.php similarity index 100% rename from tests/plugins/testGetPluginMethod/header.php rename to test/plugins/testGetPluginMethod/header.php diff --git a/tests/plugins/testGetPluginWithClassFile/OtherPlugFile.php b/test/plugins/testGetPluginWithClassFile/OtherPlugFile.php similarity index 100% rename from tests/plugins/testGetPluginWithClassFile/OtherPlugFile.php rename to test/plugins/testGetPluginWithClassFile/OtherPlugFile.php diff --git a/tests/plugins/testGetPluginWithClassFile/header.php b/test/plugins/testGetPluginWithClassFile/header.php similarity index 100% rename from tests/plugins/testGetPluginWithClassFile/header.php rename to test/plugins/testGetPluginWithClassFile/header.php diff --git a/tests/plugins/testInvalidClass/TestInvalidClass.php b/test/plugins/testInvalidClass/TestInvalidClass.php similarity index 100% rename from tests/plugins/testInvalidClass/TestInvalidClass.php rename to test/plugins/testInvalidClass/TestInvalidClass.php diff --git a/tests/plugins/testInvalidClass/header.php b/test/plugins/testInvalidClass/header.php similarity index 100% rename from tests/plugins/testInvalidClass/header.php rename to test/plugins/testInvalidClass/header.php diff --git a/tests/plugins/testLoadHeader/loadHeader/Plug.php b/test/plugins/testLoadHeader/loadHeader/Plug.php similarity index 100% rename from tests/plugins/testLoadHeader/loadHeader/Plug.php rename to test/plugins/testLoadHeader/loadHeader/Plug.php diff --git a/tests/plugins/testLoadHeader/loadHeader/header.php b/test/plugins/testLoadHeader/loadHeader/header.php similarity index 100% rename from tests/plugins/testLoadHeader/loadHeader/header.php rename to test/plugins/testLoadHeader/loadHeader/header.php diff --git a/tests/plugins/testLoadHeaderNotIPluginHeader/TestLoadPlugin.php b/test/plugins/testLoadHeaderNotIPluginHeader/TestLoadPlugin.php similarity index 100% rename from tests/plugins/testLoadHeaderNotIPluginHeader/TestLoadPlugin.php rename to test/plugins/testLoadHeaderNotIPluginHeader/TestLoadPlugin.php diff --git a/tests/plugins/testLoadHeaderNotIPluginHeader/header.php b/test/plugins/testLoadHeaderNotIPluginHeader/header.php similarity index 100% rename from tests/plugins/testLoadHeaderNotIPluginHeader/header.php rename to test/plugins/testLoadHeaderNotIPluginHeader/header.php diff --git a/tests/plugins/testLoadPlugin/TestLoadPlugin.php b/test/plugins/testLoadPlugin/TestLoadPlugin.php similarity index 100% rename from tests/plugins/testLoadPlugin/TestLoadPlugin.php rename to test/plugins/testLoadPlugin/TestLoadPlugin.php diff --git a/tests/plugins/testLoadPlugin/header.php b/test/plugins/testLoadPlugin/header.php similarity index 100% rename from tests/plugins/testLoadPlugin/header.php rename to test/plugins/testLoadPlugin/header.php diff --git a/tests/plugins/testMissingHeader/TestMissingHeader.php b/test/plugins/testMissingHeader/TestMissingHeader.php similarity index 100% rename from tests/plugins/testMissingHeader/TestMissingHeader.php rename to test/plugins/testMissingHeader/TestMissingHeader.php diff --git a/tests/plugins/testMissingPlugin/header.php b/test/plugins/testMissingPlugin/header.php similarity index 100% rename from tests/plugins/testMissingPlugin/header.php rename to test/plugins/testMissingPlugin/header.php diff --git a/tests/plugins/testReloadPlugin/TestReloadPlugin.php b/test/plugins/testReloadPlugin/TestReloadPlugin.php similarity index 100% rename from tests/plugins/testReloadPlugin/TestReloadPlugin.php rename to test/plugins/testReloadPlugin/TestReloadPlugin.php diff --git a/tests/plugins/testReloadPlugin/header.php b/test/plugins/testReloadPlugin/header.php similarity index 100% rename from tests/plugins/testReloadPlugin/header.php rename to test/plugins/testReloadPlugin/header.php diff --git a/tests/temp/.gitignore b/test/temp/.gitignore similarity index 100% rename from tests/temp/.gitignore rename to test/temp/.gitignore