Skip to content

Commit

Permalink
Fix #80 - removed Zend Framework in Product Feed
Browse files Browse the repository at this point in the history
  • Loading branch information
falco-knapp committed May 28, 2024
1 parent 407a1e5 commit d98074d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Controller/Rest/Products.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Products extends Action
{

const ROUTE_PATH = '/V1/products/:sku';
const ROUTE_METHOD = \Zend_Http_Client::GET;
const ROUTE_METHOD = \Laminas\Http\Request::METHOD_GET;

/** @var \Flagbit\Inxmail\Helper\AuthHelper */
private $authHelper;
Expand Down
12 changes: 6 additions & 6 deletions Test/Unit/Model/Api/ApiClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function setUp()

public function testSetHeaderDefault()
{
$this->_apiClient->setRequestMethod(\Zend_Http_Client::POST);
$this->_apiClient->setRequestMethod(\Laminas\Http\Request::METHOD_POST);
$this->_apiClient->setHeader();
$header = $this->getObjectAttribute($this->_apiClient, '_defaultPostHeader');
$this->assertAttributeEquals(
Expand All @@ -50,8 +50,8 @@ public function testSetHeaderDefault()

public function testSetMethodGet()
{
$this->_apiClient->setRequestMethod(\Zend_Http_Client::GET);
$this->assertAttributeEquals(\Zend_Http_Client::GET,
$this->_apiClient->setRequestMethod(\Laminas\Http\Request::METHOD_GET);
$this->assertAttributeEquals(\Laminas\Http\Request::METHOD_GET,
'_requestMethod',
$this->_apiClient
);
Expand All @@ -62,7 +62,7 @@ public function testSetMethodGet()
*/
public function testSetHeaderGet()
{
$this->_apiClient->setRequestMethod(\Zend_Http_Client::GET);
$this->_apiClient->setRequestMethod(\Laminas\Http\Request::METHOD_GET);
$this->_apiClient->setHeader();
$header = $this->getObjectAttribute($this->_apiClient, '_defaultHeader');
$this->assertAttributeEquals(
Expand Down Expand Up @@ -195,15 +195,15 @@ public function testSetRequestUrlTypeException()
public function testRequest()
{
$this->_apiClient->setRequestUrl('http://example.com');
$this->_apiClient->setRequestMethod(\Zend_Http_Client::GET);
$this->_apiClient->setRequestMethod(\Laminas\Http\Request::METHOD_GET);
$response = $this->_apiClient->getResource('', '', null, ['test', 'test']);
$this->assertNotEmpty($response);
}

public function testRequestresponseCode()
{
$this->_apiClient->setRequestUrl('http://example.com');
$this->_apiClient->setRequestMethod(\Zend_Http_Client::GET);
$this->_apiClient->setRequestMethod(\Laminas\Http\Request::METHOD_GET);
$this->_apiClient->getResource('', '', null, ['test', 'test']);
$this->assertEquals(200, $this->_apiClient->getResponseStatusCode(), 'Wrong return, request failed');
}
Expand Down

0 comments on commit d98074d

Please sign in to comment.