You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a simple feature using the Behatch\Context\RestContext:
Feature: Having a header with a numeric value
Scenario: Having a header with a numeric value
Given I add "xxx" header equal to "100000000000000000000"
When I send a GET request to "http://192.168.178.161"
Expected behavior
Behatch sends a request with a header named "xxx" with the value "100000000000000000000"
Actual behavior (checked with wireshark)
Behatch sends a request with the following header: xxx: 9223372036854775807
Notes
The value behatch actually sends is 9,223,372,036,854,775,807, which is the maximum integer value for 64-bit php (see ). The problem seems to be, that a string containing numbers gets casted to an integer.
My environment:
os: debian 9 x86_64
linux: 4.9.0-5-amd64
php-version: 7.0.27-0+deb9u1
behatch/contexts: dev-master (version: 32dcd9b)
Steps to reproduce
Add a simple feature using the Behatch\Context\RestContext:
Expected behavior
Behatch sends a request with a header named "xxx" with the value "100000000000000000000"
Actual behavior (checked with wireshark)
Behatch sends a request with the following header:
xxx: 9223372036854775807Notes
The value behatch actually sends is 9,223,372,036,854,775,807, which is the maximum integer value for 64-bit php (see ). The problem seems to be, that a string containing numbers gets casted to an integer.