Skip to content
This repository was archived by the owner on Apr 20, 2021. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/Context/BaseContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ public static function getTranslationResources()
*/
public function castToInt($count)
{
return intval($count);
if (intval($count) < PHP_INT_MAX) {

return intval($count);
}

return $count;
}

protected function getMinkContext()
Expand Down
6 changes: 6 additions & 0 deletions tests/features/rest.feature
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,15 @@ Feature: Testing RESTContext
When I send a GET request to "/rest/index.php"
Then I should see "HTTP_XXX : yyy"

Scenario: Add header with large numeric value
Given I add "xxx-large-numeric" header equal to "92233720368547758070"
When I send a GET request to "/rest/index.php"
Then I should see "HTTP_XXX_LARGE_NUMERIC : 92233720368547758070"

Scenario: Header should not be cross-scenarios persistent
When I send a GET request to "/rest/index.php"
Then I should not see "HTTP_XXX : yyy"
Then I should not see "HTTP_XXX_LARGE_NUMERIC"

Scenario: Case-insensitive header name
Like describe in the rfc2614 §4.2
Expand Down