Skip to content

Commit

Permalink
Add option for bootstrapping new site with Drupal CMS (#1840)
Browse files Browse the repository at this point in the history
* Add option for bootstrapping new site with Drupal CMS

* Add assertion that new output is present

* phpcs
  • Loading branch information
balsama authored Jan 10, 2025
1 parent 428a6e2 commit 8edc651
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Command/App/NewCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ final class NewCommand extends CommandBase
* @var string[]
*/
private static array $distros = [
'acquia_drupal_cms' => 'acquia/drupal-cms-project',
'acquia_drupal_recommended' => 'acquia/drupal-recommended-project',
'acquia_next_acms' => 'acquia/next-acms',
];
Expand All @@ -39,6 +40,7 @@ protected function configure(): void
protected function execute(InputInterface $input, OutputInterface $output): int
{
$this->output->writeln('Acquia recommends most customers use <options=bold>acquia/drupal-recommended-project</> to setup a Drupal project, which includes useful utilities such as Acquia Connector.');
$this->output->writeln('<options=bold>acquia/drupal-cms-project</> is Drupal CMS scaffolded to work with Acquia hosting.');
$this->output->writeln('<options=bold>acquia/next-acms</> is a starter template for building a headless site powered by Acquia CMS and Next.js.');

if ($input->hasOption('template') && $input->getOption('template')) {
Expand Down
1 change: 1 addition & 0 deletions tests/phpunit/src/Commands/App/NewCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ public function testNewDrupalCommand(array $package, string $directory = 'drupal

$output = $this->getDisplay();
$this->assertStringContainsString('Acquia recommends most customers use acquia/drupal-recommended-project to setup a Drupal project', $output);
$this->assertStringContainsString('acquia/drupal-cms-project is Drupal CMS scaffolded to work with Acquia hosting.', $output);
$this->assertStringContainsString('Choose a starting project', $output);
$this->assertStringContainsString($project, $output);
$this->assertTrue($mockFileSystem->isAbsolutePath($this->newProjectDir), 'Directory path is not absolute');
Expand Down

0 comments on commit 8edc651

Please sign in to comment.