Skip to content

Commit dfa2bca

Browse files
committed
MC-5824: Remove data migration from main Page Builder module
- Fix integration test
1 parent fc8beb3 commit dfa2bca

File tree

3 files changed

+9
-1
lines changed
  • app/code/Magento/PageBuilderDataMigration/Setup/DataConverter
  • dev/tests/integration

3 files changed

+9
-1
lines changed

app/code/Magento/PageBuilderDataMigration/Setup/DataConverter/TreeConverter.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ public function __construct(
6868
* @param string $string
6969
*
7070
* @return string
71+
* @throws NoSuchEntityException
72+
* @throws UnableMigrateWithOutParentException
7173
*/
7274
public function convert(string $string) : string
7375
{
@@ -90,6 +92,8 @@ public function convert(string $string) : string
9092
* @param array $children
9193
*
9294
* @return string
95+
* @throws NoSuchEntityException
96+
* @throws UnableMigrateWithOutParentException
9397
*/
9498
private function convertTreeItem(array $itemData, array $additionalData = [], array $children = []) : string
9599
{
@@ -152,6 +156,8 @@ function ($childItem, $childIndex, $children = []) use ($additionalData) {
152156
* @param array $itemAdditionalData
153157
*
154158
* @return string
159+
* @throws NoSuchEntityException
160+
* @throws UnableMigrateWithOutParentException
155161
*/
156162
private function processItemRendering(
157163
RendererInterface $renderer,
@@ -199,6 +205,7 @@ function () use ($itemData) {
199205
* @param array $itemAdditionalData
200206
* @return string
201207
* @throws UnableMigrateWithOutParentException
208+
* @throws NoSuchEntityException
202209
*/
203210
private function handleRenderException(
204211
\Exception $exception,

dev/tests/integration/_files/Magento/TestModulePageBuilderDataMigration/etc/di.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
9-
<type name="Magento\PageBuilder\Setup\DataConverter\RendererPool">
9+
<type name="Magento\PageBuilderDataMigration\Setup\DataConverter\RendererPool">
1010
<arguments>
1111
<argument name="renderers" xsi:type="array">
1212
<item name="custom" xsi:type="object">Magento\TestModulePageBuilderDataMigration\Setup\DataConverter\Renderer\Custom</item>

dev/tests/integration/testsuite/Magento/PageBuilderDataMigration/Setup/DataConverter/MixedToPageBuilderTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ class MixedToPageBuilderTest extends \PHPUnit\Framework\TestCase
1717
public function testConvert($originalContentFileName, $migratedContentFileName)
1818
{
1919
$objectManager = Bootstrap::getObjectManager();
20+
/* @var \Magento\PageBuilderDataMigration\Setup\DataConverter\MixedToPageBuilder $mixedToPageBuilderConverter*/
2021
$mixedToPageBuilderConverter = $objectManager->create(
2122
\Magento\PageBuilderDataMigration\Setup\DataConverter\MixedToPageBuilder::class
2223
);

0 commit comments

Comments
 (0)