2017 © Pedro Peláez
 

behat-extension behat-registry

Inject a registry in to feature contexts

image

davedevelopment/behat-registry

Inject a registry in to feature contexts

  • Monday, June 16, 2014
  • by davedevelopment
  • Repository
  • 1 Watchers
  • 1 Stars
  • 5,367 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 2 Versions
  • 1 % Grown

The README.md

behat-registry

What is it?

A little extension that allows a simple registry to be injected in to FeatureContexts, allowing steps to share data across contexts if necessary, (*1)

Installation

The only documented way to install behat-registry is with composer, (*2)

``` bash $ composer.phar require --dev davedevelopment/behat-registry:*, (*3)


Usage ----- Add the extension to your `behat.yml` file: ``` yaml default: extensions: DaveDevelopment\BehatRegistry\Extension:

If you implement the DaveDevelopment\BehatRegistry\Context\Initializer\RegistryAwareInterface with your Context classes, they will have a Registry injected., (*4)

``` php <?php, (*5)

use DaveDevelopment\BehatRegistry\Context\Initializer\RegistryAwareInterface; use DaveDevelopment\BehatRegistry\Registry;, (*6)

class FeatureContext implements RegistryAwareInterface { public function setRegistry(Registry $registry) { $this->registry = $registry; }, (*7)


If you want some items to persist between scenarios, call the persist method with the key. ``` php <?php $this->registry->userId = 123; $this->registry->persist("userId");

Copyright (c) 2012 Dave Marshall. See LICENCE for further details, (*8)

The Versions

16/06 2014

dev-master

9999999-dev

Inject a registry in to feature contexts

  Sources   Download

MIT

The Requires

 

test behat

19/04 2013

v0.1.0

0.1.0.0

Inject a registry in to feature contexts

  Sources   Download

MIT

The Requires

 

test behat