File tree 1 file changed +13
-1
lines changed
lib/internal/Magento/Framework/Mview/Test/Unit/View
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
383
383
->method ('getViewId ' )
384
384
->willReturn ($ viewId );
385
385
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
+
386
398
$ model = new Subscription (
387
399
$ this ->resourceMock ,
388
400
$ this ->triggerFactoryMock ,
@@ -396,7 +408,7 @@ public function testBuildStatementIgnoredColumnSubscriptionLevel(): void
396
408
397
409
$ method = new \ReflectionMethod ($ model , 'buildStatement ' );
398
410
$ method ->setAccessible (true );
399
- $ statement = $ method ->invoke ($ model , Trigger::EVENT_UPDATE , $ otherChangelogMock );
411
+ $ statement = $ method ->invoke ($ model , Trigger::EVENT_UPDATE , $ this -> viewMock );
400
412
401
413
$ this ->assertStringNotContainsString ($ ignoredColumnName , $ statement );
402
414
$ this ->assertStringContainsString ($ notIgnoredColumnName , $ statement );
You can’t perform that action at this time.
0 commit comments