postcon/client-ip-extension

A Behat Extension accessing the client ip address

Maintainers

Package info

github.com/Postcon/ClientIpExtension

Type:behat-extension

pkg:composer/postcon/client-ip-extension

Statistics

Installs: 16 399

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

1.0.1 2016-02-01 08:33 UTC

This package is auto-updated.

Last update: 2026-03-09 04:42:31 UTC


README

This behat extension allows a Context object to access the client's IP address. The IP is aquired by requesting a Url (e.g. https://api.ipify.org/).

# behat.yml
default:
  extensions:
    Postcon\ClientIpExtension\Extension:
      url: https://api.ipify.org/

Alternatively, the IP address can be fixed configured:

# behat.yml
default:
  extensions:
    Postcon\ClientIpExtension\Extension:
      value: 1.2.3.4

To access the client's IP address, the behat Context class needs to implement Postcon\ClientIpExtension\ClientIpInterface.