Skip to content

Commit 8073878

Browse files
authored
Merge pull request #17 from magento-commerce/1.0.2-master-php74
MC-34856: PHP 7.4 support for 2.3.x
2 parents 58b1f98 + 8bf4e43 commit 8073878

File tree

11 files changed

+31
-12
lines changed

11 files changed

+31
-12
lines changed

AdobeIms/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento/module-adobe-ims",
33
"description": "Magento module responsible for authentication to Adobe services",
44
"require": {
5-
"php": "~7.1.3||~7.2.0||~7.3.0",
5+
"php": "~7.3.0||~7.4.0",
66
"magento/framework": "*",
77
"magento/module-adobe-ims-api": "*",
88
"magento/module-authorization": "*",

AdobeImsApi/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento/module-adobe-ims-api",
33
"description": "Implementation of Magento module responsible for authentication to Adobe services",
44
"require": {
5-
"php": "~7.1.3||~7.2.0||~7.3.0",
5+
"php": "~7.3.0||~7.4.0",
66
"magento/framework": "*"
77
},
88
"type": "magento2-module",

AdobeStockAdminUi/Test/Unit/Controller/Adminhtml/System/Config/TestConnectionTest.php

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
use Magento\AdobeStockAdminUi\Controller\Adminhtml\System\Config\TestConnection;
1111
use Magento\AdobeStockClientApi\Api\ClientInterface;
12+
use Magento\Backend\App\Action\Context;
13+
use Magento\Framework\App\RequestInterface;
1214
use Magento\Framework\Controller\Result\Json;
1315
use Magento\Framework\Controller\Result\JsonFactory;
1416
use Magento\Framework\Filter\StripTags;
@@ -42,6 +44,11 @@ class TestConnectionTest extends TestCase
4244
*/
4345
private $stripTagsMock;
4446

47+
/**
48+
* @var RequestInterface|MockObject
49+
*/
50+
private $request;
51+
4552
/**
4653
* @var TestConnection
4754
*/
@@ -53,15 +60,21 @@ class TestConnectionTest extends TestCase
5360
protected function setUp(): void
5461
{
5562
$this->objectManager = new ObjectManager($this);
56-
$this->clientMock = $this->getMockForAbstractClass(ClientInterface::class);
63+
$context = $this->createMock(Context::class);
64+
$this->request = $this->createMock(RequestInterface::class);
65+
$context->expects($this->once())
66+
->method('getRequest')
67+
->willReturn($this->request);
68+
$this->clientMock = $this->createMock(ClientInterface::class);
5769
$this->resultJsonFactoryMock = $this->createMock(JsonFactory::class);
5870
$this->stripTagsMock = $this->createMock(StripTags::class);
5971
$this->testConnection = $this->objectManager->getObject(
6072
TestConnection::class,
6173
[
6274
'client' => $this->clientMock,
6375
'resultJsonFactory' => $this->resultJsonFactoryMock,
64-
'tagFilter' => $this->stripTagsMock
76+
'tagFilter' => $this->stripTagsMock,
77+
'context' => $context
6578
]
6679
);
6780
}
@@ -71,6 +84,9 @@ protected function setUp(): void
7184
*/
7285
public function testExecute(): void
7386
{
87+
$this->request->expects($this->once())
88+
->method('getParams')
89+
->willReturn(['api_key' => 'the_api_key']);
7490
$this->clientMock->expects($this->once())
7591
->method('testConnection')
7692
->willReturn(true);
@@ -95,6 +111,9 @@ public function testExecute(): void
95111
*/
96112
public function testExecuteWithError(): void
97113
{
114+
$this->request->expects($this->once())
115+
->method('getParams')
116+
->willReturn(['api_key' => 'the_api_key']);
98117
$this->clientMock->expects($this->once())
99118
->method('testConnection')
100119
->willReturn(false);

AdobeStockAdminUi/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento/module-adobe-stock-admin-ui",
33
"description": "Magento module responsible for the admin panel UI implementation",
44
"require": {
5-
"php": "~7.1.3||~7.2.0||~7.3.0",
5+
"php": "~7.3.0||~7.4.0",
66
"magento/framework": "*",
77
"magento/module-adobe-ims-api": "*",
88
"magento/module-adobe-stock-client-api": "*",

AdobeStockAsset/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento/module-adobe-stock-asset",
33
"description": "Magento module responsible for the Adobe Stock assets handling implementation on Magento side",
44
"require": {
5-
"php": "~7.1.3||~7.2.0||~7.3.0",
5+
"php": "~7.3.0||~7.4.0",
66
"magento/framework": "*",
77
"magento/module-adobe-stock-asset-api": "*",
88
"magento/module-adobe-stock-client-api": "*",

AdobeStockAssetApi/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento/module-adobe-stock-asset-api",
33
"description": "Magento module responsible for Adobe Stock assets handling on Magento side",
44
"require": {
5-
"php": "~7.1.3||~7.2.0||~7.3.0",
5+
"php": "~7.3.0||~7.4.0",
66
"magento/framework": "*"
77
},
88
"type": "magento2-module",

AdobeStockClient/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento/module-adobe-stock-client",
33
"description": "Magento module responsible for interaction with Adobe Stock API implementation",
44
"require": {
5-
"php": "~7.1.3||~7.2.0||~7.3.0",
5+
"php": "~7.3.0||~7.4.0",
66
"magento/framework": "*",
77
"magento/module-adobe-ims-api": "*",
88
"magento/module-adobe-stock-client-api": "*",

AdobeStockClientApi/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento/module-adobe-stock-client-api",
33
"description": "Magento module responsible for interaction with Adobe Stock API",
44
"require": {
5-
"php": "~7.1.3||~7.2.0||~7.3.0",
5+
"php": "~7.3.0||~7.4.0",
66
"magento/framework": "*"
77
},
88
"type": "magento2-module",

AdobeStockImage/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento/module-adobe-stock-image",
33
"description": "Magento module responsible for the images handling implementation",
44
"require": {
5-
"php": "~7.1.3||~7.2.0||~7.3.0",
5+
"php": "~7.3.0||~7.4.0",
66
"magento/framework": "*",
77
"magento/module-adobe-stock-client-api": "*",
88
"magento/module-adobe-stock-asset-api": "*",

AdobeStockImageAdminUi/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento/module-adobe-stock-image-admin-ui",
33
"description": "Magento module responsible for the admin panel images UI implementation",
44
"require": {
5-
"php": "~7.1.3||~7.2.0||~7.3.0",
5+
"php": "~7.3.0||~7.4.0",
66
"magento/framework": "*",
77
"magento/module-adobe-ims": "*",
88
"magento/module-adobe-ims-api": "*",

0 commit comments

Comments
 (0)