enlitepro / enlite-behat-extension
Behat extension for integration Zend Framework 2 application
Requires
- php: >=5.3.3
- behat/behat: 2.5.0
- zendframework/zendframework: >=2.2.0
Requires (Dev)
- phpunit/phpunit: 3.7.*
This package is not auto-updated.
Last update: 2024-12-17 03:05:34 UTC
README
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
Installation
Add yo your composer.json
{ "require": { "enlitepro/enlite-behat-extension": "1.0.*" } }
and add in your behat.yml
default: extensions: EnliteBehatExtension\Zf2Extension: ~ # module: moduleName # config: path_to_application.config.php # environment: testing
Usage
# 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
-
EnliteBehatExtension\Context\ApplicationAwareInterface
- injectZend\Mvc\Application
. Your can use traitEnliteBehatExtension\Context\ApplicationAwareTrait
to implement required methods -
Zend\ServiceManager\ServiceLocatorAwareInterface
- inject service manager.
Credits
Inspired by Symfony2Extension