diff --git a/tests/Transport/Curl/CurlTest.php b/tests/Transport/Curl/CurlTest.php index 7d4b0c8fa..76d7983d4 100644 --- a/tests/Transport/Curl/CurlTest.php +++ b/tests/Transport/Curl/CurlTest.php @@ -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; }