From d98074dd8ab30206ce875dfcfd8aee9e111716d7 Mon Sep 17 00:00:00 2001 From: Falco Knapp Date: Tue, 28 May 2024 14:39:09 +0200 Subject: [PATCH] Fix #80 - removed Zend Framework in Product Feed --- Controller/Rest/Products.php | 2 +- Test/Unit/Model/Api/ApiClientTest.php | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Controller/Rest/Products.php b/Controller/Rest/Products.php index 1a335b1..294eef8 100644 --- a/Controller/Rest/Products.php +++ b/Controller/Rest/Products.php @@ -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; diff --git a/Test/Unit/Model/Api/ApiClientTest.php b/Test/Unit/Model/Api/ApiClientTest.php index 6913a86..a6b4b3c 100644 --- a/Test/Unit/Model/Api/ApiClientTest.php +++ b/Test/Unit/Model/Api/ApiClientTest.php @@ -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( @@ -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 ); @@ -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( @@ -195,7 +195,7 @@ 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); } @@ -203,7 +203,7 @@ public function testRequest() 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'); }