Skip to content

Commit

Permalink
Fix hooks processing in cURL tests
Browse files Browse the repository at this point in the history
  • Loading branch information
schlessera committed Sep 11, 2023
1 parent 30afc43 commit a154c56
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/Transport/Curl/CurlTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,17 @@ protected function getOptions($other = array()) {

$this->curl_handle = null;

$hooks = new Hooks();
$hooks->register(
if (!array_key_exists('hooks', $options)) {
$options['hooks'] = new Hooks();
}

$options['hooks']->register(
'curl.before_request',
function ($handle) {
$this->curl_handle = $handle;
}
);

$options['hooks'] = $hooks;

return $options;
}

Expand Down

0 comments on commit a154c56

Please sign in to comment.