Skip to content

Commit 4f93f7b

Browse files
committed
ACP2E-1458: Product is not visible on the Storefront after a staging update enabling it is applied
1 parent d24c28f commit 4f93f7b

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

lib/internal/Magento/Framework/Mview/Test/Unit/View/SubscriptionTest.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
use Magento\Framework\Mview\View\CollectionInterface;
1919
use Magento\Framework\Mview\View\StateInterface;
2020
use Magento\Framework\Mview\View\Subscription;
21+
use Magento\Framework\Mview\View\SubscriptionStatementPostprocessorInterface;
2122
use Magento\Framework\Mview\ViewInterface;
2223
use PHPUnit\Framework\MockObject\MockObject;
2324
use PHPUnit\Framework\TestCase;
@@ -127,6 +128,9 @@ protected function setUp(): void
127128
]
128129
]
129130
]);
131+
$statementPostprocessorMock = $this->createMock(SubscriptionStatementPostprocessorInterface::class);
132+
$statementPostprocessorMock->method('process')
133+
->willReturnArgument(2);
130134
$this->model = new Subscription(
131135
$this->resourceMock,
132136
$this->triggerFactoryMock,
@@ -136,7 +140,8 @@ protected function setUp(): void
136140
'columnName',
137141
[],
138142
[],
139-
$mviewConfigMock
143+
$mviewConfigMock,
144+
$statementPostprocessorMock
140145
);
141146
}
142147

@@ -417,6 +422,9 @@ public function testBuildStatementIgnoredColumnSubscriptionLevel(): void
417422
]
418423
]
419424
]);
425+
$statementPostprocessorMock = $this->createMock(SubscriptionStatementPostprocessorInterface::class);
426+
$statementPostprocessorMock->method('process')
427+
->willReturnArgument(2);
420428

421429
$this->connectionMock->expects($this->any())
422430
->method('isTableExists')
@@ -464,7 +472,8 @@ public function testBuildStatementIgnoredColumnSubscriptionLevel(): void
464472
'columnName',
465473
[],
466474
$ignoredData,
467-
$mviewConfigMock
475+
$mviewConfigMock,
476+
$statementPostprocessorMock
468477
);
469478

470479
$method = new ReflectionMethod($model, 'buildStatement');

lib/internal/Magento/Framework/Mview/View/Subscription.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ class Subscription implements SubscriptionInterface, SubscriptionTriggersInterfa
108108
* @param array $ignoredUpdateColumnsBySubscription
109109
* @param Config|null $mviewConfig
110110
* @param SubscriptionStatementPostprocessorInterface|null $statementPostprocessor
111+
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
111112
*/
112113
public function __construct(
113114
ResourceConnection $resource,

0 commit comments

Comments
 (0)