2017 © Pedro Peláez
 

library behat-context-injection-extension

ability to inject other contexts to steps methods

image

yavin/behat-context-injection-extension

ability to inject other contexts to steps methods

  • Sunday, April 24, 2016
  • by Yavin
  • Repository
  • 1 Watchers
  • 0 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Behat context injection extension

Build Status, (*1)

With this extension you can inject contexts into methods. It should work with Behat 3.1+, (*2)

class MyContext implements Context
{
    /**
     * @Then I can inject context as argument
     */
    public function iCanInjectContextAsArgument(MyOtherContextClass $myOtherContext)
    {
        $myOtherContext->someMethod();
    }

    //...
}

Instalation

  1. With composer.json, (*3)

    composer require yavin/behat-context-injection-extension:~1.0
    
  2. Add extension to behat.yml, (*4)

    default:
       suites:
           example:
               paths: [ %paths.base%/my/features/path ]
               contexts:
                   - My\Context\Namespace\MyContext
                   - My\Context\Namespace\MyOtherContextClass
       extensions:
           Yavin\Behat\Extension\ContextInjection\ContextInjectionExtension: ~
    

example implementation in /tests directory, (*5)

The Versions

24/04 2016

dev-master

9999999-dev

ability to inject other contexts to steps methods

  Sources   Download

MIT

The Requires

 

by Avatar Yavin

24/04 2016

v1.0.0

1.0.0.0

ability to inject other contexts to steps methods

  Sources   Download

MIT

The Requires

 

by Avatar Yavin