Skip to content

Commit 8c1aa15

Browse files
Merge branch 'develop' into AC-13289-latest
2 parents 406fa86 + f04c182 commit 8c1aa15

File tree

9 files changed

+62
-17
lines changed

9 files changed

+62
-17
lines changed

app/code/Magento/AwsS3PageBuilder/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "Aws S3 Page Builder module",
44
"require": {
55
"magento/framework": "*",
6-
"php": "~8.1.0||~8.2.0||~8.3.0"
6+
"php": "~8.2.0||~8.3.0"
77
},
88
"suggest": {
99
"magento/module-page-builder": "*",

app/code/Magento/CatalogPageBuilderAnalytics/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"magento/module-page-builder-analytics": "*",
99
"magento/module-catalog": "*",
1010
"magento/framework": "*",
11-
"php": "~8.1.0||~8.2.0||~8.3.0"
11+
"php": "~8.2.0||~8.3.0"
1212
},
1313
"type": "magento2-module",
1414
"license": [

app/code/Magento/CmsPageBuilderAnalytics/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"magento/module-page-builder-analytics": "*",
99
"magento/module-cms": "*",
1010
"magento/framework": "*",
11-
"php": "~8.1.0||~8.2.0||~8.3.0"
11+
"php": "~8.2.0||~8.3.0"
1212
},
1313
"type": "magento2-module",
1414
"license": [

app/code/Magento/PageBuilder/Model/Wysiwyg/DefaultConfigProvider.php

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,34 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2018 Adobe
4+
* All Rights Reserved.
55
*/
66
declare(strict_types=1);
77

88
namespace Magento\PageBuilder\Model\Wysiwyg;
99

10+
use Magento\Framework\DataObject;
11+
use Magento\Framework\View\Asset\Repository;
12+
1013
/**
1114
* This DefaultConfigProvider overrides existing configuration provided from the cms module
1215
*/
1316
class DefaultConfigProvider implements \Magento\Framework\Data\Wysiwyg\ConfigProviderInterface
1417
{
1518
/**
16-
* @var \Magento\Framework\View\Asset\Repository
19+
* @var Repository
1720
*/
18-
private $assetRepo;
21+
private Repository $assetRepo;
1922
/**
2023
* @var array
2124
*/
2225
private $additionalSettings;
2326
/**
24-
* @param \Magento\Framework\View\Asset\Repository $assetRepo
27+
* @param Repository $assetRepo
2528
* @param array $additionalSettings
2629
*/
2730
public function __construct(
28-
\Magento\Framework\View\Asset\Repository $assetRepo,
31+
Repository $assetRepo,
2932
array $additionalSettings
3033
) {
3134
$this->assetRepo = $assetRepo;
@@ -34,15 +37,15 @@ public function __construct(
3437
/**
3538
* Returns configuration data
3639
*
37-
* @param \Magento\Framework\DataObject $config
38-
* @return \Magento\Framework\DataObject
40+
* @param DataObject $config
41+
* @return DataObject
3942
*/
40-
public function getConfig(\Magento\Framework\DataObject $config): \Magento\Framework\DataObject
43+
public function getConfig(DataObject $config): DataObject
4144
{
4245
$config->addData(
4346
[
4447
'tinymce' => [
45-
'toolbar' => 'undo redo | styles | fontsizeselect | lineheight | forecolor backcolor ' .
48+
'toolbar' => 'undo redo | styles | fontfamily fontsize | lineheight | forecolor backcolor ' .
4649
'| bold italic underline | alignleft aligncenter alignright | numlist bullist ' .
4750
'| link image table charmap',
4851

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?php
2+
/**
3+
* Copyright 2018 Adobe
4+
* All Rights Reserved.
5+
*/
6+
declare(strict_types=1);
7+
8+
namespace Magento\PageBuilder\Test\Unit\Model\Wysiwyg;
9+
10+
use Magento\PageBuilder\Model\Wysiwyg\DefaultConfigProvider;
11+
use Magento\Framework\DataObject;
12+
use Magento\Framework\View\Asset\Repository;
13+
use PHPUnit\Framework\MockObject\MockObject;
14+
use PHPUnit\Framework\TestCase;
15+
16+
class DefaultConfigProviderTest extends TestCase
17+
{
18+
/**
19+
* @var Repository|MockObject
20+
*/
21+
private Repository $assetRepo;
22+
23+
/**
24+
* @inheritDoc
25+
*/
26+
protected function setUp(): void
27+
{
28+
$this->assetRepo = $this->createMock(Repository::class);
29+
parent::setUp();
30+
}
31+
32+
/**
33+
* @return void
34+
*/
35+
public function testGetConfig(): void
36+
{
37+
$config = new DataObject();
38+
$configProvider = new DefaultConfigProvider($this->assetRepo, []);
39+
$result = $configProvider->getConfig($config);
40+
$this->assertStringContainsString('fontfamily fontsize', $result->getTinymce()['toolbar']);
41+
}
42+
}

app/code/Magento/PageBuilder/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"magento/module-wishlist": "*",
2222
"magento/module-require-js": "*",
2323
"magento/module-media-storage": "*",
24-
"php": "~8.1.0||~8.2.0||~8.3.0",
24+
"php": "~8.2.0||~8.3.0",
2525
"phpgt/dom": "^4.1"
2626
},
2727
"suggest": {

app/code/Magento/PageBuilderAdminAnalytics/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
},
77
"require": {
88
"magento/framework": "*",
9-
"php": "~8.1.0||~8.2.0||~8.3.0"
9+
"php": "~8.2.0||~8.3.0"
1010
},
1111
"suggest": {
1212
"magento/module-admin-analytics": "*",

app/code/Magento/PageBuilderAnalytics/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"magento/module-analytics": "*",
66
"magento/module-page-builder": "*",
77
"magento/framework": "*",
8-
"php": "~8.1.0||~8.2.0||~8.3.0"
8+
"php": "~8.2.0||~8.3.0"
99
},
1010
"type": "magento2-module",
1111
"license": [

app/code/Magento/PageBuilderImageAttribute/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "Width & Height attribute - Pagebuilder image",
44
"require": {
55
"magento/framework": "*",
6-
"php": "~8.1.0||~8.2.0||~8.3.0"
6+
"php": "~8.2.0||~8.3.0"
77
},
88
"type": "magento2-module",
99
"license": [

0 commit comments

Comments
 (0)