Skip to content

Commit

Permalink
Fix tests for 8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
remicollet committed Jul 9, 2024
1 parent 74984d4 commit e0919d1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/client002.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ echo "Test\n";
class Observer implements SplObserver
{
#[ReturnTypeWillChange]
function update(SplSubject $client, http\Client\Request $request = null, StdClass $progress = null) {
function update(SplSubject $client, ?http\Client\Request $request = null, ?StdClass $progress = null) {
echo "P";
/* fence against buggy infof() calls in some curl versions */
$compare = $client->getProgressInfo($request);
Expand Down
2 changes: 1 addition & 1 deletion tests/client028.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class UserHandler implements http\Client\Curl\User
return count($this->client);
}

function wait(int $timeout_ms = null) {
function wait(?int $timeout_ms = null) {
echo "W";

if ($timeout_ms === null) {
Expand Down
4 changes: 2 additions & 2 deletions tests/info002.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ Test
http\Exception\BadMessageException: http\Message::__construct(): Failed to parse headers: unexpected character '\057' at pos 4 of 'HTTP/1.1 99 Apples in my Basket' in %sinfo002.php:%d
Stack trace:
#0 %sinfo002.php(%d): http\Message->__construct('HTTP/1.1 99 App...')
#1 %sinfo002.php(%d): {closure}()
#1 %sinfo002.php(%d): {closur%s}()
#2 %sinfo002.php(%d): trap(Object(Closure))
#3 {main}
http\Exception\BadMessageException: http\Message::__construct(): Failed to parse headers: unexpected character '\040' at pos 7 of 'CONNECT HTTP/1.1' in %sinfo002.php:%d
Stack trace:
#0 %sinfo002.php(%d): http\Message->__construct('CONNECT HTTP/1....')
#1 %sinfo002.php(%d): {closure}()
#1 %sinfo002.php(%d): {closur%s}()
#2 %sinfo002.php(%d): trap(Object(Closure))
#3 {main}
HTTP/1.1 200
Expand Down

0 comments on commit e0919d1

Please sign in to comment.