postcon/client-ip-extension

A Behat Extension accessing the client ip address

Installs: 15 430

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 6

Forks: 0

Open Issues: 0

Type:behat-extension

1.0.1 2016-02-01 08:33 UTC

This package is auto-updated.

Last update: 2024-11-09 01:40:57 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.