Skip to content

kollex/BehatMessengerContext

 
 

Repository files navigation

Behat Messenger Context

Version Build Status Code Coverage
master CI Coverage Status
develop CI Coverage Status

Installation

Step 1: Install Context

Open a command console, enter your project directory and execute:

$ composer require --dev macpaw/behat-messenger-context

Step 2: Update Container config to load Messenger Context

In the config/services_test.yaml file of your project:

    BehatMessengerContext\:
        resource: '../vendor/macpaw/behat-messenger-context/src/*'
        arguments:
            $container: '@test.service_container'
            $placeholderPatternMap:
                'datetime_atom': '/\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/'

Step 3: Configure Messenger

Copying config/packages/dev/messenger.yaml and pasting that into config/packages/test/. This gives us messenger configuration that will only be used in the test environment. Uncomment the code, and replace sync with in-memory. Do that for both of the transports.

framework:
    messenger:
        transports:
            async: 'in-memory://'
            async_priority_high: 'in-memory://'
            ...
...

Step 4: Configure Behat

Go to behat.yml

...
  contexts:
    - BehatMessengerContext\Context\MessengerContext
...

About

Behat Messenger Context

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 97.2%
  • JavaScript 2.8%