Commit 8c6b43f2 authored by Marin Purgar's avatar Marin Purgar

Use Zend\\Http\\Client in test

parent f4a00cbd
...@@ -58,7 +58,7 @@ class Zend2HttpTest extends \PHPUnit_Framework_TestCase ...@@ -58,7 +58,7 @@ class Zend2HttpTest extends \PHPUnit_Framework_TestCase
$options = array('optionZ' => 123, 'options' => array('optionX' => 'Y')); $options = array('optionZ' => 123, 'options' => array('optionX' => 'Y'));
$adapterOptions = array('optionX' => 'Y'); $adapterOptions = array('optionX' => 'Y');
$mock = $this->getMock('Zend2_Http_Client'); $mock = $this->getMock('Zend\Http\Client');
$mock->expects($this->once()) $mock->expects($this->once())
->method('setConfig') ->method('setConfig')
->with($this->equalTo($adapterOptions)); ->with($this->equalTo($adapterOptions));
...@@ -85,7 +85,7 @@ class Zend2HttpTest extends \PHPUnit_Framework_TestCase ...@@ -85,7 +85,7 @@ class Zend2HttpTest extends \PHPUnit_Framework_TestCase
$this->adapter->setOptions($options); $this->adapter->setOptions($options);
$zendHttp = $this->adapter->getZendHttp(); $zendHttp = $this->adapter->getZendHttp();
$this->assertThat($zendHttp, $this->isInstanceOf('Zend2_Http_Client')); $this->assertThat($zendHttp, $this->isInstanceOf('Zend\Http\Client'));
} }
public function testExecuteGet() public function testExecuteGet()
...@@ -110,7 +110,7 @@ class Zend2HttpTest extends \PHPUnit_Framework_TestCase ...@@ -110,7 +110,7 @@ class Zend2HttpTest extends \PHPUnit_Framework_TestCase
$response = new \Zend_Http_Response(200, array('status' => 'HTTP 1.1 200 OK'), $responseData); $response = new \Zend_Http_Response(200, array('status' => 'HTTP 1.1 200 OK'), $responseData);
$mock = $this->getMock('Zend2_Http_Client'); $mock = $this->getMock('Zend\Http\Client');
$mock->expects($this->once()) $mock->expects($this->once())
->method('setMethod') ->method('setMethod')
->with($this->equalTo($method)); ->with($this->equalTo($method));
...@@ -158,7 +158,7 @@ class Zend2HttpTest extends \PHPUnit_Framework_TestCase ...@@ -158,7 +158,7 @@ class Zend2HttpTest extends \PHPUnit_Framework_TestCase
$response = new \Zend_Http_Response(200, array('status' => 'HTTP 1.1 200 OK'), $responseData); $response = new \Zend_Http_Response(200, array('status' => 'HTTP 1.1 200 OK'), $responseData);
$mock = $this->getMock('Zend2_Http_Client'); $mock = $this->getMock('Zend\Http\Client');
$mock->expects($this->once()) $mock->expects($this->once())
->method('setMethod') ->method('setMethod')
->with($this->equalTo($method)); ->with($this->equalTo($method));
...@@ -193,7 +193,7 @@ class Zend2HttpTest extends \PHPUnit_Framework_TestCase ...@@ -193,7 +193,7 @@ class Zend2HttpTest extends \PHPUnit_Framework_TestCase
$response = new \Zend_Http_Response(404, array(), ''); $response = new \Zend_Http_Response(404, array(), '');
$endpoint = new Endpoint(); $endpoint = new Endpoint();
$mock = $this->getMock('Zend2_Http_Client'); $mock = $this->getMock('Zend\Http\Client');
$mock->expects($this->once()) $mock->expects($this->once())
->method('request') ->method('request')
->will($this->returnValue($response)); ->will($this->returnValue($response));
...@@ -212,7 +212,7 @@ class Zend2HttpTest extends \PHPUnit_Framework_TestCase ...@@ -212,7 +212,7 @@ class Zend2HttpTest extends \PHPUnit_Framework_TestCase
$response = new \Zend_Http_Response(200, array('status' => 'HTTP 1.1 200 OK'), 'data'); $response = new \Zend_Http_Response(200, array('status' => 'HTTP 1.1 200 OK'), 'data');
$endpoint = new Endpoint(); $endpoint = new Endpoint();
$mock = $this->getMock('Zend2_Http_Client'); $mock = $this->getMock('Zend\Http\Client');
$mock->expects($this->once()) $mock->expects($this->once())
->method('request') ->method('request')
->will($this->returnValue($response)); ->will($this->returnValue($response));
...@@ -244,7 +244,7 @@ class Zend2HttpTest extends \PHPUnit_Framework_TestCase ...@@ -244,7 +244,7 @@ class Zend2HttpTest extends \PHPUnit_Framework_TestCase
$endpoint = new Endpoint(); $endpoint = new Endpoint();
$response = new \Zend_Http_Response(200, array('status' => 'HTTP 1.1 200 OK'), 'dummy'); $response = new \Zend_Http_Response(200, array('status' => 'HTTP 1.1 200 OK'), 'dummy');
$mock = $this->getMock('Zend2_Http_Client'); $mock = $this->getMock('Zend\Http\Client');
$mock->expects($this->once()) $mock->expects($this->once())
->method('setFileUpload') ->method('setFileUpload')
->with( ->with(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment