2017 © Pedro Peláez
 

lib behat-zendframework-extension

Extension connect Behat scenario with Zendframework application

image

alteris/behat-zendframework-extension

Extension connect Behat scenario with Zendframework application

  • Wednesday, September 28, 2016
  • by timiTao
  • Repository
  • 3 Watchers
  • 4 Stars
  • 5,467 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 4 Versions
  • 11 % Grown

The README.md

Behat Zend framework integration

Integration Behat ^3.1 with Zend\Mvc\ApplicationInterface. This should allow integrate with Zend framework v2.* and v3.*., (*1)

Installing extension

The easiest way to install is by using Composer:, (*2)

$> curl -sS https://getcomposer.org/installer | php
$> php composer.phar require alteris/behat-zendframework-extension='~1.0'

or composer.json, (*3)

"require": {
    "alteris/behat-zendframework-extension": "~1.0"
},

Configuration

You can then activate the extension in your behat.yml:, (*4)

    default:
        # ...
        extensions:
            Alteris\BehatZendframeworkExtension\ServiceContainer\Extension:
                configuration: PATH_TO_application.config.php

Injecting Application

Your context need to implement Alteris\BehatZendframeworkExtension\Context\ContextAwareInterface and will be intialized with Zend\Mcv\ApplicationInterface;, (*5)

Injecting Services

The extension will automatically convert parameters injected into a context. You need to have set alias/name starting with '@':, (*6)

default:
    suites:
        default:
            contexts:
                - FeatureContext:
                    testService: '@testService'
        extensions:
            Alteris\BehatZendframeworkExtension\ServiceContainer\Extension:
                configuration: PATH_TO_application.config.php

The FeatureContext will then be initialized with the service from the Zend Framework container:, (*7)

<?php

namespace FeatureContext;

use Behat\Behat\Context\Context;
use ModuleTest\Service\TestService;

class FeatureContext implements Context
{
    public function __construct(TestService $testService)
    {
        //Service from Zend\Mvc\Application
    }
}

Extra

Examples

Versioning

Staring version 1.0.0, will follow Semantic Versioning v2.0.0., (*8)

Contributors

The Versions

28/09 2016

dev-master

9999999-dev

Extension connect Behat scenario with Zendframework application

  Sources   Download

MIT

The Requires

 

The Development Requires

bdd framework extension zf2 zend behat zf3

28/09 2016

v1.0.0

1.0.0.0

Extension connect Behat scenario with Zendframework application

  Sources   Download

MIT

The Requires

 

The Development Requires

28/09 2016

dev-argument-resolver

dev-argument-resolver

Extension connect Behat scenario with Zendframework application

  Sources   Download

MIT

The Requires

 

The Development Requires

27/09 2016

v0.1

0.1.0.0

Extension connect Behat scenario with Zendframework application

  Sources   Download

MIT

The Requires

 

The Development Requires