Skip to content

Commit

Permalink
Try to fix 32-bit setcookie tests, again
Browse files Browse the repository at this point in the history
  • Loading branch information
nikic committed Sep 8, 2020
1 parent 4c43806 commit e1c422c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
4 changes: 2 additions & 2 deletions ext/standard/tests/network/setcookie_array_option_error.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ try {
if (PHP_INT_SIZE == 8) {
try {
// To go above year 9999: 60 * 60 * 24 * 365 * 9999
setrawcookie('name', 'value', ['expires' => 315328464000]);
setcookie('name', 'value', ['expires' => 315328464000]);
} catch (\ValueError $e) {
var_dump($e->getMessage() == 'setcookie(): "expires" option cannot have a year greater than 9999');
}
Expand All @@ -66,7 +66,7 @@ setcookie(): option "foo" is invalid
setcookie(): "path" option cannot contain ",", ";", " ", "\t", "\r", "\n", "\013", or "\014"
setcookie(): "domain" option cannot contain ",", ";", " ", "\t", "\r", "\n", "\013", or "\014"
setcookie(): Expects exactly 3 arguments when argument #3 ($expires_or_options) is an array
bool(false)
bool(true)
array(1) {
[0]=>
string(%s) "X-Powered-By: PHP/%s"
Expand Down
7 changes: 0 additions & 7 deletions ext/standard/tests/network/setrawcookie_error.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ try {
} catch (\ValueError $e) {
echo $e->getMessage() . "\n";
}
// To go above year 9999: 60 * 60 * 24 * 365 * 9999
try {
setrawcookie('name', 'value', 315328464000);
} catch (\ValueError $e) {
echo $e->getMessage() . "\n";
}
try {
setrawcookie('name', 'value', 100, 'invalid;');
} catch (\ValueError $e) {
Expand Down Expand Up @@ -59,7 +53,6 @@ var_dump(headers_list());
setrawcookie(): Argument #1 ($name) cannot be empty
setrawcookie(): Argument #1 ($name) cannot contain "=", ",", ";", " ", "\t", "\r", "\n", "\013", or "\014"
setrawcookie(): Argument #2 ($value) cannot contain ",", ";", " ", "\t", "\r", "\n", "\013", or "\014"
setrawcookie(): "expires" option cannot have a year greater than 9999
setrawcookie(): "path" option cannot contain ",", ";", " ", "\t", "\r", "\n", "\013", or "\014"
setrawcookie(): "domain" option cannot contain ",", ";", " ", "\t", "\r", "\n", "\013", or "\014"
bool(true)
Expand Down

0 comments on commit e1c422c

Please sign in to comment.