We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1001d8f commit 6c325d8Copy full SHA for 6c325d8
tests/DefaultHttpAdapterWithConfigTest.php
@@ -13,12 +13,14 @@ class DefaultHttpAdapterWithConfigTest extends HttpClientTest
13
{
14
protected function createHttpAdapter(): ClientInterface
15
16
- $reflected = new \ReflectionClass(HttpClientTest::class);
+ $reflected = new ReflectionClass(HttpClientTest::class);
17
$property = $reflected->getProperty('defaultHeaders');
18
19
- if($property->isStatic()) {
+ // version >= 4
20
+ if ($property->isStatic()) {
21
self::$defaultHeaders['X-Test'] = 'configuration-value';
22
} else {
23
+ // version < 4
24
$this->defaultHeaders['X-Test'] = 'configuration-value';
25
}
26
0 commit comments