Skip to content
Browse files

[Http] Minor fixes

  • Loading branch information...
1 parent 1910745 commit 8ac462e67a6bf0094bf3b7ba7b98d476e0fa92b7 @Maks3w Maks3w committed with May 8, 2012
View
2 tests/Zend/Http/Client/CommonHttpTests.php
@@ -69,7 +69,7 @@
/**
* Common HTTP client adapter
*
- * @var \Zend\Http\Client\Adapter
+ * @var \Zend\Http\Client\Adapter\AdapterInterface
*/
protected $_adapter = null;
View
7 tests/Zend/Http/Client/ProxyAdapterTest.php
@@ -55,7 +55,7 @@ protected function setUp()
list($host, $port) = explode(':', TESTS_ZEND_HTTP_CLIENT_HTTP_PROXY, 2);
if (! $host)
- $this->markTestSkipped("No valid proxy host name or address specified.");
+ $this->markTestSkipped('No valid proxy host name or address specified.');
$port = (int) $port;
if ($port == 0) {
@@ -87,13 +87,12 @@ protected function setUp()
parent::setUp();
} else {
- $this->markTestSkipped("Zend\\Http\\Client proxy server tests are not enabled in TestConfiguration.php");
+ $this->markTestSkipped('Zend\Http\Client proxy server tests are not enabled in TestConfiguration.php');
}
}
/**
* Test that when no proxy is set the adapter falls back to direct connection
- *
*/
public function testFallbackToSocket()
{
@@ -104,7 +103,7 @@ public function testFallbackToSocket()
$this->client->setUri($this->baseuri . 'testGetLastRequest.php');
$res = $this->client->request(Client::TRACE);
if ($res->getStatus() == 405 || $res->getStatus() == 501) {
- $this->markTestSkipped("Server does not allow the TRACE method");
+ $this->markTestSkipped('Server does not allow the TRACE method');
}
$this->assertEquals($this->client->getLastRawRequest(), $res->getBody(), 'Response body should be exactly like the last request');
View
5 tests/Zend/Http/Client/SocketTest.php
@@ -20,6 +20,7 @@
*/
namespace ZendTest\Http\Client;
+
use Zend\Http\Client\Adapter;
/**
@@ -204,8 +205,8 @@ public function testExceptionOnReadTimeout()
try {
$this->client->send();
- $this->fail("Expected a timeout Zend\Http\Client\Adapter\Exception");
- } catch (Adapter\Exception $e) {
+ $this->fail('Expected a timeout Zend\Http\Client\Adapter\Exception\TimeoutException');
+ } catch (Adapter\Exception\TimeoutException $e) {
$this->assertEquals(Adapter\Exception\TimeoutException::READ_TIMEOUT, $e->getCode());
}
View
4 tests/Zend/Http/Client/UseCaseTest.php
@@ -31,14 +31,14 @@ class UseCaseTest extends \PHPUnit_Framework_TestCase
/**
* Common HTTP client
*
- * @var Zend_Http_Client
+ * @var \Zend\Http\Client
*/
protected $client = null;
/**
* Common HTTP client adapter
*
- * @var Zend_Http_Client_Adapter_Interface
+ * @var \Zend\Http\Client\Adapter\AdapterInterface
*/
protected $adapter = null;
View
1 tests/Zend/Http/ClientTest.php
@@ -3,6 +3,7 @@
namespace ZendTest\Http;
use Zend\Http\Client,
+ Zend\Http\Exception,
Zend\Http\Header\SetCookie;
class ClientTest extends \PHPUnit_Framework_TestCase

0 comments on commit 8ac462e

Please sign in to comment.
Something went wrong with that request. Please try again.