X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fdrupal%2Fdrupal-extension%2Fdoc%2Fenvironment.rst;fp=vendor%2Fdrupal%2Fdrupal-extension%2Fdoc%2Fenvironment.rst;h=8454e1ae87fd7fb31abdcb29f501fc958816859a;hp=0000000000000000000000000000000000000000;hb=1270d9129ce8f27c9b28b10518e32132c58e0aca;hpb=c27c0f0cdaa3f354b1fe54a56ae7e854be6e3f68 diff --git a/vendor/drupal/drupal-extension/doc/environment.rst b/vendor/drupal/drupal-extension/doc/environment.rst new file mode 100644 index 000000000..8454e1ae8 --- /dev/null +++ b/vendor/drupal/drupal-extension/doc/environment.rst @@ -0,0 +1,42 @@ +Environment specific settings +============================= + +Some of the settings in ``behat.yml`` are environment specific. For example the +base URL may be ``http://mysite.localhost`` on your local development +environment, while on a test server it might be ``http://127.0.0.1:8080``. Some +other environment specific settings are the Drupal root path and the paths to +search for subcontexts. + +If you intend to run your tests on different environments these settings should +not be committed to ``behat.yml``. Instead they should be exported in an +environment variable. Before running tests Behat will check the ``BEHAT_PARAMS`` +environment variable and add these settings to the ones that are present in +``behat.yml``. This variable should contain a JSON object with your settings. + +Example JSON object: + +.. code-block:: json + + { + "extensions": { + "Behat\\MinkExtension": { + "base_url": "http://myproject.localhost" + }, + "Drupal\\DrupalExtension": { + "drupal": { + "drupal_root": "/var/www/myproject" + } + } + } + } + + +To export this into the ``BEHAT_PARAMS`` environment variable, squash the JSON +object into a single line and surround with single quotes: + +.. code-block: bash + + $ export BEHAT_PARAMS='{"extensions":{"Behat\\MinkExtension":{"base_url":"http://myproject.localhost"},"Drupal\\DrupalExtension":{"drupal":{"drupal_root":"/var/www/myproject"}}}}' + +There is also a `Drush extension `_ +that can help you generate these environment variables.