File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed
app/code/Magento/CatalogWidget
Test/Unit/Model/Rule/Condition Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ public function getNewChildSelectOptions()
82
82
public function collectValidatedAttributes ($ productCollection )
83
83
{
84
84
foreach ($ this ->getConditions () as $ condition ) {
85
- $ condition ->addToCollection ($ productCollection );
85
+ $ condition ->collectValidatedAttributes ($ productCollection );
86
86
}
87
87
return $ this ;
88
88
}
Original file line number Diff line number Diff line change @@ -223,4 +223,12 @@ public function getMappedSqlField()
223
223
224
224
return $ result ;
225
225
}
226
+
227
+ /**
228
+ * {@inheritdoc}
229
+ */
230
+ public function collectValidatedAttributes ($ productCollection )
231
+ {
232
+ return $ this ->addToCollection ($ productCollection );
233
+ }
226
234
}
Original file line number Diff line number Diff line change @@ -80,9 +80,9 @@ public function testCollectValidatedAttributes()
80
80
->disableOriginalConstructor ()
81
81
->getMock ();
82
82
$ condition = $ this ->getMockBuilder (\Magento \CatalogWidget \Model \Rule \Condition \Combine::class)
83
- ->disableOriginalConstructor ()->setMethods (['addToCollection ' ])
83
+ ->disableOriginalConstructor ()->setMethods (['collectValidatedAttributes ' ])
84
84
->getMock ();
85
- $ condition ->expects ($ this ->any ())->method ('addToCollection ' )->with ($ collection )
85
+ $ condition ->expects ($ this ->any ())->method ('collectValidatedAttributes ' )->with ($ collection )
86
86
->will ($ this ->returnSelf ());
87
87
88
88
$ this ->condition ->setConditions ([$ condition ]);
You can’t perform that action at this time.
0 commit comments