forked from Chapabu/codeception-module-drupal
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtestinit.sh
More file actions
executable file
·27 lines (22 loc) · 1020 Bytes
/
testinit.sh
File metadata and controls
executable file
·27 lines (22 loc) · 1020 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh
# To run the tests for this package, we need a working installation of Drupal. Drupal has already been downloaded as a
# dev dependency, but we still need to install it. I've also made the very unlikely assumption that you don't have
# Drush installed. We use the locally managed version of Drush to install the Composer managed Drupal installation using
# an SQLite database.
# Tl;dr - We install Drupal with an sqlite database for testing.
# The command to get the site installed is already long anough as it is, this also makes it quicker to change if I ever
# have to.
ADMIN_USER="admin"
ADMIN_PASSWORD="admin"
ADMIN_MAIL="null@dev.null"
PATH_TO_DRUPAL="$PWD/vendor/drupal/drupal"
echo "$(tput setaf 3)Installing Drupal 7 test site"
drush qd testsites/drupal7 \
--core=drupal-7.x \
--account-name=${ADMIN_USER} \
--account-pass=${ADMIN_PASSWORD} \
--account-mail=${ADMIN_MAIL} \
--no-server \
-y \
> /dev/null 2>&1
echo "$(tput setaf 2)Done installing Drupal 7 test site!"