Skip to content

Commit

Permalink
Merge pull request #17 from magento-commerce/1.0.2-master-php74
Browse files Browse the repository at this point in the history
MC-34856: PHP 7.4 support for 2.3.x
  • Loading branch information
svera authored Mar 2, 2021
2 parents 58b1f98 + 8bf4e43 commit 8073878
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 12 deletions.
2 changes: 1 addition & 1 deletion AdobeIms/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/module-adobe-ims",
"description": "Magento module responsible for authentication to Adobe services",
"require": {
"php": "~7.1.3||~7.2.0||~7.3.0",
"php": "~7.3.0||~7.4.0",
"magento/framework": "*",
"magento/module-adobe-ims-api": "*",
"magento/module-authorization": "*",
Expand Down
2 changes: 1 addition & 1 deletion AdobeImsApi/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/module-adobe-ims-api",
"description": "Implementation of Magento module responsible for authentication to Adobe services",
"require": {
"php": "~7.1.3||~7.2.0||~7.3.0",
"php": "~7.3.0||~7.4.0",
"magento/framework": "*"
},
"type": "magento2-module",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

use Magento\AdobeStockAdminUi\Controller\Adminhtml\System\Config\TestConnection;
use Magento\AdobeStockClientApi\Api\ClientInterface;
use Magento\Backend\App\Action\Context;
use Magento\Framework\App\RequestInterface;
use Magento\Framework\Controller\Result\Json;
use Magento\Framework\Controller\Result\JsonFactory;
use Magento\Framework\Filter\StripTags;
Expand Down Expand Up @@ -42,6 +44,11 @@ class TestConnectionTest extends TestCase
*/
private $stripTagsMock;

/**
* @var RequestInterface|MockObject
*/
private $request;

/**
* @var TestConnection
*/
Expand All @@ -53,15 +60,21 @@ class TestConnectionTest extends TestCase
protected function setUp(): void
{
$this->objectManager = new ObjectManager($this);
$this->clientMock = $this->getMockForAbstractClass(ClientInterface::class);
$context = $this->createMock(Context::class);
$this->request = $this->createMock(RequestInterface::class);
$context->expects($this->once())
->method('getRequest')
->willReturn($this->request);
$this->clientMock = $this->createMock(ClientInterface::class);
$this->resultJsonFactoryMock = $this->createMock(JsonFactory::class);
$this->stripTagsMock = $this->createMock(StripTags::class);
$this->testConnection = $this->objectManager->getObject(
TestConnection::class,
[
'client' => $this->clientMock,
'resultJsonFactory' => $this->resultJsonFactoryMock,
'tagFilter' => $this->stripTagsMock
'tagFilter' => $this->stripTagsMock,
'context' => $context
]
);
}
Expand All @@ -71,6 +84,9 @@ protected function setUp(): void
*/
public function testExecute(): void
{
$this->request->expects($this->once())
->method('getParams')
->willReturn(['api_key' => 'the_api_key']);
$this->clientMock->expects($this->once())
->method('testConnection')
->willReturn(true);
Expand All @@ -95,6 +111,9 @@ public function testExecute(): void
*/
public function testExecuteWithError(): void
{
$this->request->expects($this->once())
->method('getParams')
->willReturn(['api_key' => 'the_api_key']);
$this->clientMock->expects($this->once())
->method('testConnection')
->willReturn(false);
Expand Down
2 changes: 1 addition & 1 deletion AdobeStockAdminUi/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/module-adobe-stock-admin-ui",
"description": "Magento module responsible for the admin panel UI implementation",
"require": {
"php": "~7.1.3||~7.2.0||~7.3.0",
"php": "~7.3.0||~7.4.0",
"magento/framework": "*",
"magento/module-adobe-ims-api": "*",
"magento/module-adobe-stock-client-api": "*",
Expand Down
2 changes: 1 addition & 1 deletion AdobeStockAsset/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/module-adobe-stock-asset",
"description": "Magento module responsible for the Adobe Stock assets handling implementation on Magento side",
"require": {
"php": "~7.1.3||~7.2.0||~7.3.0",
"php": "~7.3.0||~7.4.0",
"magento/framework": "*",
"magento/module-adobe-stock-asset-api": "*",
"magento/module-adobe-stock-client-api": "*",
Expand Down
2 changes: 1 addition & 1 deletion AdobeStockAssetApi/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/module-adobe-stock-asset-api",
"description": "Magento module responsible for Adobe Stock assets handling on Magento side",
"require": {
"php": "~7.1.3||~7.2.0||~7.3.0",
"php": "~7.3.0||~7.4.0",
"magento/framework": "*"
},
"type": "magento2-module",
Expand Down
2 changes: 1 addition & 1 deletion AdobeStockClient/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/module-adobe-stock-client",
"description": "Magento module responsible for interaction with Adobe Stock API implementation",
"require": {
"php": "~7.1.3||~7.2.0||~7.3.0",
"php": "~7.3.0||~7.4.0",
"magento/framework": "*",
"magento/module-adobe-ims-api": "*",
"magento/module-adobe-stock-client-api": "*",
Expand Down
2 changes: 1 addition & 1 deletion AdobeStockClientApi/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/module-adobe-stock-client-api",
"description": "Magento module responsible for interaction with Adobe Stock API",
"require": {
"php": "~7.1.3||~7.2.0||~7.3.0",
"php": "~7.3.0||~7.4.0",
"magento/framework": "*"
},
"type": "magento2-module",
Expand Down
2 changes: 1 addition & 1 deletion AdobeStockImage/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/module-adobe-stock-image",
"description": "Magento module responsible for the images handling implementation",
"require": {
"php": "~7.1.3||~7.2.0||~7.3.0",
"php": "~7.3.0||~7.4.0",
"magento/framework": "*",
"magento/module-adobe-stock-client-api": "*",
"magento/module-adobe-stock-asset-api": "*",
Expand Down
2 changes: 1 addition & 1 deletion AdobeStockImageAdminUi/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/module-adobe-stock-image-admin-ui",
"description": "Magento module responsible for the admin panel images UI implementation",
"require": {
"php": "~7.1.3||~7.2.0||~7.3.0",
"php": "~7.3.0||~7.4.0",
"magento/framework": "*",
"magento/module-adobe-ims": "*",
"magento/module-adobe-ims-api": "*",
Expand Down
2 changes: 1 addition & 1 deletion AdobeStockImageApi/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/module-adobe-stock-image-api",
"description": "Magento module responsible for the images handling",
"require": {
"php": "~7.1.3||~7.2.0||~7.3.0",
"php": "~7.3.0||~7.4.0",
"magento/framework": "*"
},
"type": "magento2-module",
Expand Down

0 comments on commit 8073878

Please sign in to comment.