Behat extension for integration Zend Framework 2 application

v1.0.0 2013-10-15 16:05 UTC

This package is not auto-updated.

Last update: 2023-06-05 19:57:49 UTC


Provides integration layer for Zend Framework 2:

  • Integration into Zend Framework module structure - you can run an isolated module suite by name, classname and even full path

  • ApplicationAwareInterface, which provides booted application for your context

  • Zend\ServiceManager\ServiceLocatorAwareInterface, which provides service locator for your context


Add yo your composer.json

    "require": {
        "enlitepro/enlite-behat-extension": "1.0.*"

and add in your behat.yml

    EnliteBehatExtension\Zf2Extension: ~
      # module: moduleName
      # config: path_to_application.config.php
      # environment: testing


# create directory structure and context file in module Application
behat --init "@Application"

# You can use short module notation to run features
behat "@Application"

There are two interface, which you can implement for your context

  1. EnliteBehatExtension\Context\ApplicationAwareInterface - inject Zend\Mvc\Application. Your can use trait EnliteBehatExtension\Context\ApplicationAwareTrait to implement required methods

  2. Zend\ServiceManager\ServiceLocatorAwareInterface - inject service manager.


Inspired by Symfony2Extension