|
@@ 272-282 (lines=11) @@
|
| 269 |
|
$this->assertEquals(200, $this->response->getStatusCode()); |
| 270 |
|
} |
| 271 |
|
|
| 272 |
|
public function test_setStatusCode_less_than_min_status_code() |
| 273 |
|
{ |
| 274 |
|
try { |
| 275 |
|
$this->getMethodSetStatusCode()->invokeArgs($this->response, [99]); |
| 276 |
|
} catch (InvalidArgumentException $exception) { |
| 277 |
|
$this->assertEquals( |
| 278 |
|
sprintf('Invalid status code "%s"; must be an integer between %d and %d, inclusive', 99, Response::MIN_STATUS_CODE_VALUE, Response::MAX_STATUS_CODE_VALUE), |
| 279 |
|
$exception->getMessage() |
| 280 |
|
); |
| 281 |
|
} |
| 282 |
|
} |
| 283 |
|
|
| 284 |
|
public function test_setStatusCode_greater_than_max_status_code() |
| 285 |
|
{ |
|
@@ 284-294 (lines=11) @@
|
| 281 |
|
} |
| 282 |
|
} |
| 283 |
|
|
| 284 |
|
public function test_setStatusCode_greater_than_max_status_code() |
| 285 |
|
{ |
| 286 |
|
try { |
| 287 |
|
$this->getMethodSetStatusCode()->invokeArgs($this->response, [600]); |
| 288 |
|
} catch (InvalidArgumentException $exception) { |
| 289 |
|
$this->assertEquals( |
| 290 |
|
sprintf('Invalid status code "%s"; must be an integer between %d and %d, inclusive', 600, Response::MIN_STATUS_CODE_VALUE, Response::MAX_STATUS_CODE_VALUE), |
| 291 |
|
$exception->getMessage() |
| 292 |
|
); |
| 293 |
|
} |
| 294 |
|
} |
| 295 |
|
|
| 296 |
|
public function test_setStatusCode() |
| 297 |
|
{ |