PHPackages                             ec-europa/oe-poetry-behat - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. ec-europa/oe-poetry-behat

AbandonedArchivedLibrary

ec-europa/oe-poetry-behat
=========================

Poetry Client Behat extension.

0.3.4(4y ago)030.4k[3 issues](https://github.com/ec-europa/oe-poetry-behat/issues)1EUPL-1.2PHPPHP &gt;=5.6

Since Oct 12Pushed 4y ago25 watchersCompare

[ Source](https://github.com/ec-europa/oe-poetry-behat)[ Packagist](https://packagist.org/packages/ec-europa/oe-poetry-behat)[ RSS](/packages/ec-europa-oe-poetry-behat/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (9)Versions (15)Used By (1)

Poetry Client Behat Extension
=============================

[](#poetry-client-behat-extension)

[![Build Status](https://camo.githubusercontent.com/ee3c93373cc2bd9f8386e2904dd654482a96d6e3e5fb03d08ca8a61c4910b3ff/68747470733a2f2f64726f6e652e66706669732e65752f6170692f6261646765732f65632d6575726f70612f6f652d706f657472792d62656861742f7374617475732e737667)](https://drone.fpfis.eu/ec-europa/oe-poetry-behat/)[![Packagist](https://camo.githubusercontent.com/6197c3e3cbb012b5b66a00e1d562f14b2be228565ff353e30244f0be2fd74460/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f65632d6575726f70612f6f652d706f657472792d62656861742e737667)](https://packagist.org/packages/ec-europa/oe-poetry-behat)

Behat extension for the European Commission's [Poetry Client](https://github.com/ec-europa/oe-poetry-client).

Installation Using Docker Compose
---------------------------------

[](#installation-using-docker-compose)

Requirements:

- [Docker](https://www.docker.com/get-docker)
- [Docker-compose](https://docs.docker.com/compose/)

Copy `docker-compose.yml.dist` into `docker-compose.yml`.

You can make any alterations you need for your local Docker setup. However, the defaults should be enough to set the project up. Note that there are mac specific settings available in the `docker-compose.yml.dist`.

Run:

```
$ docker-compose up -d
$ docker-compose exec web composer install

```

Setup
-----

[](#setup)

Load the Poetry context and configure the extension as shown below:

```
default:
  suites:
    default:
      contexts:
        - 'EC\Behat\PoetryExtension\Context\PoetryContext'
  extensions:
    EC\Behat\PoetryExtension:
      application:
        base_url: 'http://local.dev'  # Required: application base URL running Poetry Client library.
        endpoint: '/my-endpoint'      # Required: notification endpoint on your application.
```

The following extensive configuration allows you to further tweak the extension's behaviour:

```
default:
  suites:
    default:
      contexts:
        - 'EC\Behat\PoetryExtension\Context\PoetryContext'
  extensions:
    EC\Behat\PoetryExtension:
      application:
        base_url: 'http://local.dev'  # Required: application base URL running the Poetry Client library.
        endpoint: '/my-endpoint'      # Required: notification endpoint for your application.
      service:
        host: 'localhost'             # Optional: host where mock Poetry service will be running, defaults to `localhost`.
        port: '28080'                 # Optional: mock Poetry service port, defaults to `28080`.
        endpoint: '/service'          # Optional: mock Poetry service endpoint, defaults to `/service`.
        wsdl: '/wsdl'                 # Optional: mock Poetry service WSDL endpoint, defaults to `/wsdl`.
        username: 'username'          # Optional: username used by the mock service to authenticate on your application, defaults to `username`.
        password: 'password'          # Optional: password used by the mock service to authenticate on your application, defaults to `password`.
```

Service parameters can be also overridden in your Behat scenarios (see below).

Usage
-----

[](#usage)

All scenarios and/or features that wish to use the extension's steps will need to be tagged with `@poetry`.

To instantiate test Poetry client with redefined settings use:

```
Given the Poetry client uses the following settings:
"""
  identifier.code: STSI
  identifier.year: 2017
  identifier.number: 40017
  identifier.version: 0
  identifier.part: 11
  client.wsdl: http://my-client.eu/wsdl
  notification.username: foo
  notification.password: bar
"""
```

To send a raw XML notification message to the client endpoint use:

```
When Poetry notifies the client with the following XML:
"""

...
"""
```

Or, if you want to express the message in a `withArray()` format, use:

```
When Poetry notifies the client with the following "notification.translation_received" message:
"""
identifier:
  code: "WEB"
  year: "2017"
  number: "40012"
  ...
"""
```

To setup test responses for the Poetry server use:

```
Given Poetry will return the following XML response:
"""

            WEB
            2017
            ...
"""
```

Or, if you want to express the message in a `withArray()` format, use:

```
Given Poetry will return the following "response.status" message response:
"""
identifier:
  code: WEB
  year: 2017
  number: 40029
  version: 0
  ...
"""
```

Client responses can be asserted by using the following step:

```
Then client response contains the following text:
  | WEB |
  | 2017                |
  | OK  |
```

Or, if you want to assert XML portions, use:

```
And Poetry service received request should contain the following XML portion:
"""

    content.html
    BASE64ENCODEDFILECONTENT

        1

"""
```

Application parameters can be overridden by using the following step:

```
When Poetry service uses the following settings:
"""
  username: foo
  password: bar
"""
```

For more detailed examples please refer to the Poetry Behat Extension's [tests features](features) baring in mind that steps beginning with `Given the test application...` are only used to test the extension itself and, thus, not available to the extension users.

### Token replacement

[](#token-replacement)

Both Behat extension settings and current Poetry client settings can be used in Behat steps as replacement tokens. The following tokens will be automatically replaced:

- Behat extension settings in dot-notation prefixed by `!`, like `!service.host` or `!service.port`
- Poetry client string settings in dot-notation prefixed by `!poetry.`, like `!poetry.client.wsdl`.

Token replacements can be used as follow:

```
And Poetry service received request should contain the following XML portion:
"""

   foo
   bar
   !poetry.client.wsdl
   handle

"""
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 67.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~224 days

Recently: every ~379 days

Total

8

Last Release

1565d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8562a7045bde4094cf1252195ae47001970518ed7281b9e13caa6b6ffea03a5b?d=identicon)[ademarco](/maintainers/ademarco)

---

Top Contributors

[![ademarco](https://avatars.githubusercontent.com/u/153362?v=4)](https://github.com/ademarco "ademarco (47 commits)")[![voidtek](https://avatars.githubusercontent.com/u/186827?v=4)](https://github.com/voidtek "voidtek (9 commits)")[![imanoleguskiza](https://avatars.githubusercontent.com/u/14978592?v=4)](https://github.com/imanoleguskiza "imanoleguskiza (6 commits)")[![drupol](https://avatars.githubusercontent.com/u/252042?v=4)](https://github.com/drupol "drupol (4 commits)")[![Fefaine](https://avatars.githubusercontent.com/u/9037645?v=4)](https://github.com/Fefaine "Fefaine (1 commits)")[![gervasek](https://avatars.githubusercontent.com/u/14055017?v=4)](https://github.com/gervasek "gervasek (1 commits)")[![ku-enza](https://avatars.githubusercontent.com/u/2235848?v=4)](https://github.com/ku-enza "ku-enza (1 commits)")[![netlooker](https://avatars.githubusercontent.com/u/7669736?v=4)](https://github.com/netlooker "netlooker (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ec-europa-oe-poetry-behat/health.svg)

```
[![Health](https://phpackages.com/badges/ec-europa-oe-poetry-behat/health.svg)](https://phpackages.com/packages/ec-europa-oe-poetry-behat)
```

###  Alternatives

[getkirby/cms

The Kirby core

1.5k535.5k352](/packages/getkirby-cms)[neos/flow-development-collection

Flow packages in a joined repository for pull requests.

144179.3k3](/packages/neos-flow-development-collection)[neos/flow

Flow Application Framework

862.0M451](/packages/neos-flow)[drevops/behat-steps

Collection of steps for Behat

25381.7k3](/packages/drevops-behat-steps)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
