Skip to main content

Drupal 9

Install and Sync to setup a Dev Drupal platform

Submitted by system on

Drush can be used for installing website programmatically. However after installation, you might want to update the synchronization. Install Drupal database: Installs drupal when executed inside the drupal folder.
drush site-install --db-url=mysql://dbuser:dbpass@localhost/dbname --account-name=admin --account-pass=secret -y 

Remove Shortcut links:
drush ev '\Drupal::entityTypeManager()->getStorage("shortcut_set")->load("default")->delete();' 

Writing Automated tests in Drupal 9

Submitted by system on
This is a start. Install PHP Unit: PHPUnit8.4+ for Drupal 9 composer require --dev phpunit/phpunit ^8.4
For the current portal, add core-dev option composer require 'drupal/core-dev:^9.5'
composer update

Drupal requires Prophecy PhpUnit when using PHPUnit 9 or greater. composer require --dev phpspec/prophecy-phpunit:^2'