@@ 79-95 (lines=17) @@ | ||
76 | $this->$method(); |
|
77 | } |
|
78 | ||
79 | public function testKeepAlives() |
|
80 | { |
|
81 | if(!function_exists('curl_init')) |
|
82 | { |
|
83 | $this->markTestSkipped('CURL missing: cannot test http 1.1'); |
|
84 | return; |
|
85 | } |
|
86 | ||
87 | $this->method = 'http11'; |
|
88 | $this->client->method = 'http11'; |
|
89 | $this->client->keepalive = true; |
|
90 | ||
91 | // to successfully test keepalive, we have to reuse the same client for all tests, we can not recreate one on setup/teardown... |
|
92 | foreach ($this->getSingleHttpTestMethods() as $method) { |
|
93 | $this->$method; |
|
94 | } |
|
95 | } |
|
96 | ||
97 | /** |
|
98 | * @dataProvider getSingleHttpTestMethods |
|
@@ 118-131 (lines=14) @@ | ||
115 | * @dataProvider getSingleHttpTestMethods |
|
116 | * @param string $method |
|
117 | */ |
|
118 | public function testHttp11($method) |
|
119 | { |
|
120 | if(!function_exists('curl_init')) |
|
121 | { |
|
122 | $this->markTestSkipped('CURL missing: cannot test http 1.1'); |
|
123 | return; |
|
124 | } |
|
125 | ||
126 | $this->method = 'http11'; // not an error the double assignment! |
|
127 | $this->client->method = 'http11'; |
|
128 | $this->client->keepalive = false; |
|
129 | ||
130 | $this->$method(); |
|
131 | } |
|
132 | ||
133 | /** |
|
134 | * @dataProvider getSingleHttpTestMethods |