All Projects → FriendsOfBehat → Contextserviceextension

FriendsOfBehat / Contextserviceextension

Licence: mit
🎃 [DEPRECATED] Allows to declare and use contexts services in scenario scoped container.

Projects that are alternatives of or similar to Contextserviceextension

Servicecontainerextension
📻 Allows to declare own services inside Behat container without writing an extension.
Stars: ✭ 114 (+0.88%)
Mutual labels:  dependency-injection, behat
Rxgithub
An example of MVVM using RxSwift and Swinject (DI)
Stars: ✭ 109 (-3.54%)
Mutual labels:  dependency-injection
Depject
simplest dependency injection
Stars: ✭ 90 (-20.35%)
Mutual labels:  dependency-injection
Autofac.extensions.dependencyinjection
Autofac implementation of the interfaces in Microsoft.Extensions.DependencyInjection.Abstractions, the .NET Core dependency injection abstraction.
Stars: ✭ 98 (-13.27%)
Mutual labels:  dependency-injection
Mvpandroid
Sample app to demonstrate MVP (Model - View - Presenter) architecture in android
Stars: ✭ 91 (-19.47%)
Mutual labels:  dependency-injection
No Framework Tutorial
A small tutorial to show how to create a PHP application without a framework.
Stars: ✭ 1,357 (+1100.88%)
Mutual labels:  dependency-injection
Datakernel
Alternative Java platform, built from the ground up - with its own async I/O core and DI. Ultra high-performance, simple and minimalistic - redefines server-side programming, web-development and highload!
Stars: ✭ 87 (-23.01%)
Mutual labels:  dependency-injection
Wpplugin
Boilerplate for WordPress plugin using autoload, coding standard, webpack, PHP/JS tests, etc.
Stars: ✭ 112 (-0.88%)
Mutual labels:  dependency-injection
Swiftdi
SwiftDI the new way to use your dependency in Swift 5.1
Stars: ✭ 107 (-5.31%)
Mutual labels:  dependency-injection
Agentframework
An elegant & efficient TypeScript metaprogramming API to build software agents
Stars: ✭ 97 (-14.16%)
Mutual labels:  dependency-injection
Crosscontainerextension
⚔️ [DEPRECATED] Makes possible to inject services and parameters from other containers.
Stars: ✭ 97 (-14.16%)
Mutual labels:  behat
Syrinj
Simpler dependency injection for Unity3D
Stars: ✭ 91 (-19.47%)
Mutual labels:  dependency-injection
Go Argmapper
A runtime dependency-injection library for Go that supports automatically chaining conversion functions to reach desired input and output types.
Stars: ✭ 101 (-10.62%)
Mutual labels:  dependency-injection
Symfony 3 Rest Api Example
Symfony 3 RESTful API Example
Stars: ✭ 90 (-20.35%)
Mutual labels:  behat
Behat Wordpress Extension
WordHat: Behat for WordPress
Stars: ✭ 109 (-3.54%)
Mutual labels:  behat
Container Ioc
Inversion of Control container & Dependency Injection for Javascript and Node.js apps powered by Typescript.
Stars: ✭ 89 (-21.24%)
Mutual labels:  dependency-injection
Bootique
Bootique is a minimally opinionated platform for modern runnable Java apps.
Stars: ✭ 1,326 (+1073.45%)
Mutual labels:  dependency-injection
Momentum
MVC pattern for flutter. Works as state management, dependency injection and service locator.
Stars: ✭ 99 (-12.39%)
Mutual labels:  dependency-injection
Fierycrucible
A minimalist type safe Swift dependency injection library
Stars: ✭ 112 (-0.88%)
Mutual labels:  dependency-injection
Unity
This repository contains all relevant information about Unity Container suit
Stars: ✭ 1,513 (+1238.94%)
Mutual labels:  dependency-injection

Context Service Extension License Version Build status on Linux Scrutinizer Quality Score

This library is deprecated! It will not be supported anymore - if you're using it with CrossContainerExtension v1 and SymfonyExtension v1, please consider an upgrade to SymfonyExtension v2.

Allows to declare and use contexts services in scenario scoped container.

Usage

  1. Install it:

    $ composer require friends-of-behat/context-service-extension --dev
    
  2. Enable and configure context service extension in your Behat configuration:

    # behat.yml
    default:
        # ...
        extensions:
            FriendsOfBehat\ContextServiceExtension:
               imports:
                   - "features/bootstrap/config/services.xml"
                   - "features/bootstrap/config/services.yml"
                   - "features/bootstrap/config/services.php"   
    
  3. Inside one of those files passed to configuration above, create a service tagged with fob.context_service.

    <!-- features/bootstrap/config/services.xml -->
    <?xml version="1.0" encoding="UTF-8" ?>
    <container xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://symfony.com/schema/dic/services">
        <services>
            <service id="acme.my_context" class="Acme\MyContext">
                <tag name="fob.context_service" />
            </service>
        </services>
    </container>
    
    # features/bootstrap/config/services.yml
    services:
        acme.my_context:
            class: Acme\MyContext
            tags:
                - { name: fob.context_service }
    
    // features/bootstrap/config/services.php
    use Symfony\Component\DependencyInjection\Definition;
    
    $definition = new Definition(\Acme\MyContext::class);
    $definition->addTag('fob.context_service');
    $container->setDefinition('acme.my_context', $definition);
    
  4. Configure your suite to use acme.my_context context service (note contexts_services key instead of contexts):

    # behat.yml
    default:
        # ...
           suites:
               default:
                   contexts_services:
                       - acme.my_context
    
  5. Have fun with your contexts defined in DI container as services! 🎉

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].