chapabu / codeception-drupal-runserver
Codeception extension for starting and stopping a Drush server using PHP's built in webserver.
Requires
- php: >=5.4.0
- codeception/codeception: 2.*
Requires (Dev)
- drush/drush: dev-master
This package is not auto-updated.
Last update: 2025-03-29 19:01:14 UTC
README
Branch | Status |
---|---|
Master |
Codeception extension for starting and stopping a Drush server using PHP's built in webserver and the drush runserver
command.
Requirements
- 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 :))
Installation
Via Composer
$ composer require chapabu/codeception-drupal-runserver --dev
Usage
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
Configuration options
drupalRoot
drupalRoot: docRoot
The folder (relative to your codecept.yml
file) where your Drupal installation resides (default: same directory as codecept.yml
).
drushBinary
drushBinary: ../vendor/bin/drush
The path to the Drush binary on your system (default: drush
- as if it were installed globally).
hostname
hostname: 127.0.0.1
The address to bind to the server (default: 127.0.0.1
).
port
port: 8080
The port number to bind to the server (default: 8888
).
variables
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.
Testing
$ codecept run
Credits
Most of the code for this was lifted from https://github.com/tiger-seo/PhpBuiltinServer, but rejigged to use the drush runserver
command.
License
The MIT License (MIT). Please see License File for more information.