Branch | Status |
---|---|
Master |
Codeception extension for starting and stopping a Drush server using PHP's built in webserver and the drush runserver
command.
- Drush
- PHP 5.4 (the Drush server does support PHP 5.3, but I'm not likely to actively test this. Pull requests welcome if this is required :))
Via Composer
$ composer require chapabu/codeception-drupal-runserver --dev
paths:
tests: .
log: _log
data: _data
helpers: _helpers
extensions:
enabled:
- Codeception\Extension\DrushRunserver
config:
Codeception\Extension\DrushRunserver:
drupalRoot: docroot
drushBinary: ../vendor/bin/drush
hostname: 127.0.0.1
port: 8080
variables:
site_name: My cool site
theme_default: my_awesome_theme
site_mail: admin@example.com
drupalRoot: docRoot
The folder (relative to your codecept.yml
file) where your Drupal installation resides (default: same directory as codecept.yml
).
drushBinary: ../vendor/bin/drush
The path to the Drush binary on your system (default: drush
- as if it were installed globally).
hostname: 127.0.0.1
The address to bind to the server (default: 127.0.0.1
).
port: 8080
The port number to bind to the server (default: 8888
).
variables:
site_name: My cool site
theme_default: my_awesome_theme
site_mail: admin@example.com
A key-value array of variables to override in the$conf
array for the running site.
$ codecept run
Most of the code for this was lifted from https://github.com/tiger-seo/PhpBuiltinServer, but rejigged to use the drush runserver
command.
The MIT License (MIT). Please see License File for more information.