From 8cb73751ca68e2d1e3a8bd33eedc3691931eae46 Mon Sep 17 00:00:00 2001 From: Thomas Vargiu Date: Sun, 13 Jan 2019 16:09:06 +0100 Subject: [PATCH] Added test for invalid 100 response --- test/ResponseTest.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/ResponseTest.php b/test/ResponseTest.php index 4df72fb148..b6d4a6d092 100644 --- a/test/ResponseTest.php +++ b/test/ResponseTest.php @@ -24,6 +24,13 @@ public function testResponseFactoryFromStringCreatesValidResponse() $this->assertEquals('Foo Bar', $response->getContent()); } + public function testResponseFactoryFromStringWithInvalid100ResponseContent() + { + $this->expectException(RuntimeException::class); + $string = 'HTTP/1.0 100 Continue' . "\r\n"; + Response::fromString($string); + } + public function testResponseCanRenderStatusLine() { $response = new Response();