-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1773 from magento-engcom/2.2-develop-prs
Public Pull Requests #12328 9742: Default welcome message returns after being deleted #9742 by @RomaKis #12253 New validation: 3bytes characters filter (4 bytes characters cannot be stored using UTF8) by @KarlDeux #12133 Fix for issue 12127: Single quotation marks are now decoded properly in admin attribute option input fields by @erfanimani #11389 Attribute category_ids issue by @manuelson Fixed Public Issues #9742 Default welcome message returns after being deleted #12058 Can't save emoji in custom product options #12127 Apostrophe in attribute option value in admin is not handled properly #11341 Attribute category_ids issue
- Loading branch information
Showing
10 changed files
with
176 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
dev/tests/integration/testsuite/Magento/Theme/Model/Design/ConfigTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace Magento\Theme\Model\Design; | ||
|
||
/** | ||
* Test for \Magento\Theme\Model\Design\Config\Storage. | ||
*/ | ||
class ConfigTest extends \PHPUnit\Framework\TestCase | ||
{ | ||
/** | ||
* @var \Magento\Theme\Model\Design\Config\Storage | ||
*/ | ||
private $storage; | ||
|
||
protected function setUp() | ||
{ | ||
$this->storage = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( | ||
\Magento\Theme\Model\Design\Config\Storage::class | ||
); | ||
} | ||
|
||
/** | ||
* Test design/header/welcome if it is saved in db as empty(null) it should be shown on backend as empty. | ||
* | ||
* @magentoDataFixture Magento/Theme/_files/config_data.php | ||
*/ | ||
public function testLoad() | ||
{ | ||
$data = $this->storage->load('stores', 1); | ||
foreach ($data->getExtensionAttributes()->getDesignConfigData() as $configData) { | ||
if ($configData->getPath() == 'design/header/welcome') { | ||
$this->assertSame('', $configData->getValue()); | ||
} | ||
} | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
dev/tests/integration/testsuite/Magento/Theme/_files/config_data.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
use Magento\Config\Model\Config\Factory; | ||
use Magento\TestFramework\Helper\Bootstrap; | ||
|
||
$objectManager = Bootstrap::getObjectManager(); | ||
|
||
/** @var Factory $configFactory */ | ||
$configFactory = $objectManager->create(Factory::class); | ||
/** @var \Magento\Config\Model\Config $config */ | ||
$config = $configFactory->create(); | ||
$config->setScope('stores'); | ||
$config->setStore('default'); | ||
$config->setDataByPath('design/header/welcome', null); | ||
$config->save(); |
13 changes: 13 additions & 0 deletions
13
dev/tests/integration/testsuite/Magento/Theme/_files/config_data_rollback.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); | ||
/** @var \Magento\Framework\App\ResourceConnection $resource */ | ||
$resource = $objectManager->get(\Magento\Framework\App\ResourceConnection::class); | ||
$connection = $resource->getConnection(); | ||
$tableName = $resource->getTableName('core_config_data'); | ||
|
||
$connection->query("DELETE FROM $tableName WHERE path = 'design/header/welcome';"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters