Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jan 30, 2020. It is now read-only.

Commit 1417bdb

Browse files
committed
Merge branch 'hotfix/5318'
Close zendframework/zendframework#5318
2 parents 02a046c + 92dcb62 commit 1417bdb

2 files changed

Lines changed: 0 additions & 51 deletions

File tree

test/ClientTest.php

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -350,50 +350,6 @@ public function testAdapterAlwaysReachableIfSpecified()
350350
$this->assertSame($testAdapter, $client->getAdapter());
351351
}
352352

353-
/**
354-
* Custom response object is set but still invalid code coming back
355-
* @expectedException Zend\Http\Exception\InvalidArgumentException
356-
*/
357-
public function testUsageOfCustomResponseInvalidCode()
358-
{
359-
require_once(dirname(realpath(__FILE__)) . DIRECTORY_SEPARATOR .'_files' . DIRECTORY_SEPARATOR . 'CustomResponse.php');
360-
$testAdapter = new Test();
361-
$testAdapter->setResponse(
362-
"HTTP/1.1 496 CustomResponse\r\n\r\n"
363-
. "Whatever content"
364-
);
365-
366-
$client = new Client('http://www.example.org/', array(
367-
'adapter' => $testAdapter,
368-
));
369-
$client->setResponse(new CustomResponse());
370-
$response = $client->send();
371-
}
372-
373-
/**
374-
* Custom response object is set with defined status code 497.
375-
* Should not throw an exception.
376-
*/
377-
public function testUsageOfCustomResponseCustomCode()
378-
{
379-
require_once(dirname(realpath(__FILE__)) . DIRECTORY_SEPARATOR .'_files' . DIRECTORY_SEPARATOR . 'CustomResponse.php');
380-
$testAdapter = new Test();
381-
$testAdapter->setResponse(
382-
"HTTP/1.1 497 CustomResponse\r\n\r\n"
383-
. "Whatever content"
384-
);
385-
386-
$client = new Client('http://www.example.org/', array(
387-
'adapter' => $testAdapter,
388-
));
389-
$client->setResponse(new CustomResponse());
390-
$response = $client->send();
391-
392-
$this->assertInstanceOf('ZendTest\Http\CustomResponse', $response);
393-
$this->assertEquals(497, $response->getStatusCode());
394-
$this->assertEquals('Whatever content', $response->getContent());
395-
}
396-
397353
public function testPrepareHeadersCreateRightHttpField()
398354
{
399355
$body = json_encode(array('foofoo'=>'barbar'));

test/_files/CustomResponse.php

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)