|
@@ 273-281 (lines=9) @@
|
| 270 |
|
/** |
| 271 |
|
* Throws \InvalidArgumentException for invalid header names or values. |
| 272 |
|
*/ |
| 273 |
|
function it_throws_an_exception_with_a_header_update_with_invalid_header_name() |
| 274 |
|
{ |
| 275 |
|
$header = array(); |
| 276 |
|
$value = "qux"; |
| 277 |
|
|
| 278 |
|
$arguments = array($header, $value); |
| 279 |
|
|
| 280 |
|
$this->shouldThrow('\InvalidArgumentException')->during("withHeader", $arguments); |
| 281 |
|
} |
| 282 |
|
|
| 283 |
|
/** |
| 284 |
|
* Throws \InvalidArgumentException for invalid header names or values. |
|
@@ 286-294 (lines=9) @@
|
| 283 |
|
/** |
| 284 |
|
* Throws \InvalidArgumentException for invalid header names or values. |
| 285 |
|
*/ |
| 286 |
|
function it_throws_an_exception_with_a_header_update_with_invalid_value() |
| 287 |
|
{ |
| 288 |
|
$header = "foo"; |
| 289 |
|
$value = array(); |
| 290 |
|
|
| 291 |
|
$arguments = array($header, $value); |
| 292 |
|
|
| 293 |
|
$this->shouldThrow('\InvalidArgumentException')->during("withHeader", $arguments); |
| 294 |
|
} |
| 295 |
|
|
| 296 |
|
/** |
| 297 |
|
* Existing values for the specified header will be maintained. The new |
|
@@ 370-378 (lines=9) @@
|
| 367 |
|
/** |
| 368 |
|
* Throws \InvalidArgumentException for invalid header names or values. |
| 369 |
|
*/ |
| 370 |
|
function it_throws_an_exception_with_a_header_added_with_invalid_header_name() |
| 371 |
|
{ |
| 372 |
|
$header = array(); |
| 373 |
|
$value = "qux"; |
| 374 |
|
|
| 375 |
|
$arguments = array($header, $value); |
| 376 |
|
|
| 377 |
|
$this->shouldThrow('\InvalidArgumentException')->during("withAddedHeader", $arguments); |
| 378 |
|
} |
| 379 |
|
|
| 380 |
|
/** |
| 381 |
|
* Throws \InvalidArgumentException for invalid header names or values. |
|
@@ 383-391 (lines=9) @@
|
| 380 |
|
/** |
| 381 |
|
* Throws \InvalidArgumentException for invalid header names or values. |
| 382 |
|
*/ |
| 383 |
|
function it_throws_an_exception_with_a_header_added_with_invalid_value() |
| 384 |
|
{ |
| 385 |
|
$header = "foo"; |
| 386 |
|
$value = array(); |
| 387 |
|
|
| 388 |
|
$arguments = array($header, $value); |
| 389 |
|
|
| 390 |
|
$this->shouldThrow('\InvalidArgumentException')->during("withAddedHeader", $arguments); |
| 391 |
|
} |
| 392 |
|
|
| 393 |
|
/** |
| 394 |
|
* Return an instance without the specified header. |