diff --git a/tests/ZendTest/Http/ClientTest.php b/tests/ZendTest/Http/ClientTest.php index 4518a0d125c..fa622799e82 100644 --- a/tests/ZendTest/Http/ClientTest.php +++ b/tests/ZendTest/Http/ClientTest.php @@ -350,50 +350,6 @@ public function testAdapterAlwaysReachableIfSpecified() $this->assertSame($testAdapter, $client->getAdapter()); } - /** - * Custom response object is set but still invalid code coming back - * @expectedException Zend\Http\Exception\InvalidArgumentException - */ - public function testUsageOfCustomResponseInvalidCode() - { - require_once(dirname(realpath(__FILE__)) . DIRECTORY_SEPARATOR .'_files' . DIRECTORY_SEPARATOR . 'CustomResponse.php'); - $testAdapter = new Test(); - $testAdapter->setResponse( - "HTTP/1.1 496 CustomResponse\r\n\r\n" - . "Whatever content" - ); - - $client = new Client('http://www.example.org/', array( - 'adapter' => $testAdapter, - )); - $client->setResponse(new CustomResponse()); - $response = $client->send(); - } - - /** - * Custom response object is set with defined status code 497. - * Should not throw an exception. - */ - public function testUsageOfCustomResponseCustomCode() - { - require_once(dirname(realpath(__FILE__)) . DIRECTORY_SEPARATOR .'_files' . DIRECTORY_SEPARATOR . 'CustomResponse.php'); - $testAdapter = new Test(); - $testAdapter->setResponse( - "HTTP/1.1 497 CustomResponse\r\n\r\n" - . "Whatever content" - ); - - $client = new Client('http://www.example.org/', array( - 'adapter' => $testAdapter, - )); - $client->setResponse(new CustomResponse()); - $response = $client->send(); - - $this->assertInstanceOf('ZendTest\Http\CustomResponse', $response); - $this->assertEquals(497, $response->getStatusCode()); - $this->assertEquals('Whatever content', $response->getContent()); - } - public function testPrepareHeadersCreateRightHttpField() { $body = json_encode(array('foofoo'=>'barbar')); diff --git a/tests/ZendTest/Http/_files/CustomResponse.php b/tests/ZendTest/Http/_files/CustomResponse.php deleted file mode 100644 index b45cbd1297e..00000000000 --- a/tests/ZendTest/Http/_files/CustomResponse.php +++ /dev/null @@ -1,7 +0,0 @@ -