Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[Http] Minor fixes

  • Loading branch information...
commit 8ac462e67a6bf0094bf3b7ba7b98d476e0fa92b7 1 parent 1910745
Maks Maks3w authored committed
2  tests/Zend/Http/Client/CommonHttpTests.php
@@ -69,7 +69,7 @@
69 69 /**
70 70 * Common HTTP client adapter
71 71 *
72   - * @var \Zend\Http\Client\Adapter
  72 + * @var \Zend\Http\Client\Adapter\AdapterInterface
73 73 */
74 74 protected $_adapter = null;
75 75
7 tests/Zend/Http/Client/ProxyAdapterTest.php
@@ -55,7 +55,7 @@ protected function setUp()
55 55 list($host, $port) = explode(':', TESTS_ZEND_HTTP_CLIENT_HTTP_PROXY, 2);
56 56
57 57 if (! $host)
58   - $this->markTestSkipped("No valid proxy host name or address specified.");
  58 + $this->markTestSkipped('No valid proxy host name or address specified.');
59 59
60 60 $port = (int) $port;
61 61 if ($port == 0) {
@@ -87,13 +87,12 @@ protected function setUp()
87 87 parent::setUp();
88 88
89 89 } else {
90   - $this->markTestSkipped("Zend\\Http\\Client proxy server tests are not enabled in TestConfiguration.php");
  90 + $this->markTestSkipped('Zend\Http\Client proxy server tests are not enabled in TestConfiguration.php');
91 91 }
92 92 }
93 93
94 94 /**
95 95 * Test that when no proxy is set the adapter falls back to direct connection
96   - *
97 96 */
98 97 public function testFallbackToSocket()
99 98 {
@@ -104,7 +103,7 @@ public function testFallbackToSocket()
104 103 $this->client->setUri($this->baseuri . 'testGetLastRequest.php');
105 104 $res = $this->client->request(Client::TRACE);
106 105 if ($res->getStatus() == 405 || $res->getStatus() == 501) {
107   - $this->markTestSkipped("Server does not allow the TRACE method");
  106 + $this->markTestSkipped('Server does not allow the TRACE method');
108 107 }
109 108
110 109 $this->assertEquals($this->client->getLastRawRequest(), $res->getBody(), 'Response body should be exactly like the last request');
5 tests/Zend/Http/Client/SocketTest.php
@@ -20,6 +20,7 @@
20 20 */
21 21
22 22 namespace ZendTest\Http\Client;
  23 +
23 24 use Zend\Http\Client\Adapter;
24 25
25 26 /**
@@ -204,8 +205,8 @@ public function testExceptionOnReadTimeout()
204 205
205 206 try {
206 207 $this->client->send();
207   - $this->fail("Expected a timeout Zend\Http\Client\Adapter\Exception");
208   - } catch (Adapter\Exception $e) {
  208 + $this->fail('Expected a timeout Zend\Http\Client\Adapter\Exception\TimeoutException');
  209 + } catch (Adapter\Exception\TimeoutException $e) {
209 210 $this->assertEquals(Adapter\Exception\TimeoutException::READ_TIMEOUT, $e->getCode());
210 211 }
211 212
4 tests/Zend/Http/Client/UseCaseTest.php
@@ -31,14 +31,14 @@ class UseCaseTest extends \PHPUnit_Framework_TestCase
31 31 /**
32 32 * Common HTTP client
33 33 *
34   - * @var Zend_Http_Client
  34 + * @var \Zend\Http\Client
35 35 */
36 36 protected $client = null;
37 37
38 38 /**
39 39 * Common HTTP client adapter
40 40 *
41   - * @var Zend_Http_Client_Adapter_Interface
  41 + * @var \Zend\Http\Client\Adapter\AdapterInterface
42 42 */
43 43 protected $adapter = null;
44 44
1  tests/Zend/Http/ClientTest.php
@@ -3,6 +3,7 @@
3 3 namespace ZendTest\Http;
4 4
5 5 use Zend\Http\Client,
  6 + Zend\Http\Exception,
6 7 Zend\Http\Header\SetCookie;
7 8
8 9 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.