File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
lib/internal/Magento/Framework/Mview/Test/Unit/View Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -383,6 +383,18 @@ public function testBuildStatementIgnoredColumnSubscriptionLevel(): void
383383 ->method ('getViewId ' )
384384 ->willReturn ($ viewId );
385385
386+ $ this ->viewMock ->expects ($ this ->once ())
387+ ->method ('getSubscriptions ' )
388+ ->willReturn (
389+ [
390+ $ this ->tableName => ['name ' => $ this ->tableName , 'column ' => 'columnName ' ],
391+ 'cataloginventory_stock_item ' => ['name ' => 'otherTableName ' , 'column ' => 'columnName ' ]
392+ ]
393+ );
394+ $ this ->viewMock ->expects ($ this ->once ())
395+ ->method ('getChangeLog ' )
396+ ->willReturn ($ otherChangelogMock );
397+
386398 $ model = new Subscription (
387399 $ this ->resourceMock ,
388400 $ this ->triggerFactoryMock ,
@@ -396,7 +408,7 @@ public function testBuildStatementIgnoredColumnSubscriptionLevel(): void
396408
397409 $ method = new \ReflectionMethod ($ model , 'buildStatement ' );
398410 $ method ->setAccessible (true );
399- $ statement = $ method ->invoke ($ model , Trigger::EVENT_UPDATE , $ otherChangelogMock );
411+ $ statement = $ method ->invoke ($ model , Trigger::EVENT_UPDATE , $ this -> viewMock );
400412
401413 $ this ->assertStringNotContainsString ($ ignoredColumnName , $ statement );
402414 $ this ->assertStringContainsString ($ notIgnoredColumnName , $ statement );
You can’t perform that action at this time.
0 commit comments