From 5d51c2c61a0a66e312057bb14c74b8a93c9a528f Mon Sep 17 00:00:00 2001 From: wsm Date: Fri, 25 Jan 2019 17:48:56 +1000 Subject: [PATCH] Drupal custom profile installation path (#416) * Add the custom profile path. * Include the custom Drupal profile test. --- src/Composer/Installers/DrupalInstaller.php | 19 ++++++++++--------- .../Installers/Test/InstallerTest.php | 2 ++ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/Composer/Installers/DrupalInstaller.php b/src/Composer/Installers/DrupalInstaller.php index bcfa9260..39735c1e 100644 --- a/src/Composer/Installers/DrupalInstaller.php +++ b/src/Composer/Installers/DrupalInstaller.php @@ -4,14 +4,15 @@ class DrupalInstaller extends BaseInstaller { protected $locations = array( - 'core' => 'core/', - 'module' => 'modules/{$name}/', - 'theme' => 'themes/{$name}/', - 'library' => 'libraries/{$name}/', - 'profile' => 'profiles/{$name}/', - 'drush' => 'drush/{$name}/', - 'custom-theme' => 'themes/custom/{$name}/', - 'custom-module' => 'modules/custom/{$name}/', - 'drupal-multisite' => 'sites/{$name}/', + 'core' => 'core/', + 'module' => 'modules/{$name}/', + 'theme' => 'themes/{$name}/', + 'library' => 'libraries/{$name}/', + 'profile' => 'profiles/{$name}/', + 'drush' => 'drush/{$name}/', + 'custom-theme' => 'themes/custom/{$name}/', + 'custom-module' => 'modules/custom/{$name}/', + 'custom-profile' => 'profiles/custom/{$name}/', + 'drupal-multisite' => 'sites/{$name}/' ); } diff --git a/tests/Composer/Installers/Test/InstallerTest.php b/tests/Composer/Installers/Test/InstallerTest.php index 315f0434..0c072bae 100644 --- a/tests/Composer/Installers/Test/InstallerTest.php +++ b/tests/Composer/Installers/Test/InstallerTest.php @@ -129,6 +129,7 @@ public function dataForTestSupport() array('drupal-drush', true), array('drupal-custom-theme', true), array('drupal-custom-module', true), + array('drupal-custom-profile', true), array('dolibarr-module', true), array('ee3-theme', true), array('ee3-addon', true), @@ -311,6 +312,7 @@ public function dataForTestInstallPath() array('drupal-drush', 'drush/my_command/', 'shama/my_command'), array('drupal-custom-theme', 'themes/custom/my_theme/', 'shama/my_theme'), array('drupal-custom-module', 'modules/custom/my_module/', 'shama/my_module'), + array('drupal-custom-profile', 'profiles/custom/my_profile/', 'shama/my_profile'), array('elgg-plugin', 'mod/sample_plugin/', 'test/sample_plugin'), array('eliasis-component', 'components/my_component/', 'shama/my_component'), array('eliasis-module', 'modules/my_module/', 'shama/my_module'),