Download the PHP package elife/isolated-drupal-behat-extension without Composer

On this page you can find all versions of the php package elife/isolated-drupal-behat-extension. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package isolated-drupal-behat-extension

Isolated-Drupal Behat Extension

Build Status

What does the extension do?

The Drupal extension for Behat allows you to use Behat to writes scenarios that describe and test the functionality of your Drupal 7 site.

It's flexible, in that you are able to do things such as test remote sites. Because of this, however, it doesn't run each scenario in isolation, which means that they can be influenced by each other, as well as the existing site. When using Behat to purely test your codebase this is dangerous, as scenarios might pass or fail when in fact the opposite should happen.

This extension solves this problem by running each scenario on a freshly-installed site, which allows you to test your site with confidence.

Isn't that slow?

Yes. To help counter this, the extension actually copies the first install, then copies that back instead of actually installing the site again. This means that the first scenario might take a little while to run, but you won't notice much of a difference with the others.

Won't this destroy the site that I'm working on?

No. It (mis)uses Drupal's multi-site feature, so that your site isn't touched. If your site is available at http://localhost/, for example, it installs a site into sites/localhost and tests on that (Drupal will serve it instead of your normal site), then removes it when the suite is finished.

How does it know what modules to enable?

It assumes that your install profile will set up your site. That said, you could add steps in your feature to enable modules etc as needed.

Requirements

Enabling the extension

  1. Add the extension to your dependencies (composer require elife/isolated-drupal-behat-extension).

  2. Add the extension to your Behat configuration:

    See below for configuration options.

  3. Run Behat as normal.

Configuration

The extension will use configuration options for the Drupal extension for Behat to know where your site is located, what URL it's served on etc.

Its own options are:

db_url

This is required. It is a connection string to a database that the isolated sites can be installed into.

This doesn't have to be the same type as your production setup, so you could use SQLite rather than MySQL. (Though bear in mind that if you're not using Drupal's database abstraction layer at any point you will need to use the same database type.)

Examples

profile

This is the name of the install profile to use. The default value is standard.

settings_file

This is a path to a settings.php file to use. This is empty by default.

Note that the following values will be overwritten to ensure isolation:

clean_up

By default, the extension will remove the sites it created after the suite has finished. If you're running the suite a few times in quick succession, this means it will be installing a site each time, which can be quite slow. Setting this value to false (the default is true) which cause it not clean up the filesystem, so the second (and subsequent) runs will use the copy of the installed site from the first run. This will be quicker, but it's up to the developer to make sure that no changes have been made to the install process (if required, the master site will need to be manually removed).

Running the extension's tests

Extending the extension

You can write your own Behat extension and listen for the following events:

This will allow you to interact with/extend the extension.


All versions of isolated-drupal-behat-extension with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
behat/behat Version ^3.0.6
behat/mink-extension Version ~2.0
drupal/drupal-driver Version ^1.0.1
drupal/drupal-extension Version ~3.0
symfony/dependency-injection Version ~2.5|~3.0
symfony/event-dispatcher Version ~2.3|~3.0
symfony/filesystem Version ~2.3|~3.0
symfony/process Version ~2.3|~3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package elife/isolated-drupal-behat-extension contains the following files

Loading the files please wait ....