File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
app/code/Magento/CatalogWidget/Test/Unit/Model/Rule/Condition Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -73,8 +73,13 @@ public function testGetNewChildSelectOptions()
73
73
public function testCollectValidatedAttributes ()
74
74
{
75
75
$ collection = $ this ->getMockBuilder ('\Magento\Catalog\Model\ResourceModel\Product\Collection ' )
76
- ->disableOriginalConstructor ()
76
+ ->disableOriginalConstructor ()->setMethods (['getSelect ' ])
77
+ ->getMock ();
78
+ $ select = $ this ->getMockBuilder ('\Magento\Framework\DB\Select ' )
79
+ ->disableOriginalConstructor ()->setMethods (['getPart ' ])
77
80
->getMock ();
81
+ $ select ->expects ($ this ->any ())->method ('getPart ' )->with ('from ' )->willReturn (['alias_table ' => 'table_name ' ]);
82
+ $ collection ->expects ($ this ->any ())->method ('getSelect ' )->willReturn ($ select );
78
83
$ condition = $ this ->getMockBuilder ('Magento\CatalogWidget\Model\Rule\Condition\Combine ' )
79
84
->disableOriginalConstructor ()->setMethods (['addToCollection ' ])
80
85
->getMock ();
You can’t perform that action at this time.
0 commit comments