1111use Magento \Bundle \Model \Product \Type ;
1212use Magento \Bundle \Model \ResourceModel \BundleFactory ;
1313use Magento \Bundle \Model \ResourceModel \Option \Collection ;
14- use Magento \CatalogRule \Model \ResourceModel \Product \CollectionProcessor ;
1514use Magento \Bundle \Model \ResourceModel \Selection \Collection as SelectionCollection ;
1615use Magento \Bundle \Model \ResourceModel \Selection \CollectionFactory ;
1716use Magento \Bundle \Model \Selection ;
2827use Magento \CatalogInventory \Api \StockStateInterface ;
2928use Magento \CatalogInventory \Model \StockRegistry ;
3029use Magento \CatalogInventory \Model \StockState ;
30+ use Magento \CatalogRule \Model \ResourceModel \Product \CollectionProcessor ;
3131use Magento \Framework \DataObject ;
3232use Magento \Framework \EntityManager \EntityMetadataInterface ;
3333use Magento \Framework \EntityManager \MetadataPool ;
@@ -1548,6 +1548,10 @@ public function testPrepareForCartAdvancedSpecifyProductOptions()
15481548 ->disableOriginalConstructor ()
15491549 ->getMock ();
15501550
1551+ $ buyRequest ->method ('getOptions ' )
1552+ ->willReturn ([333 => ['type ' => 'image/jpeg ' ]]);
1553+ $ option ->method ('getId ' )
1554+ ->willReturn (333 );
15511555 $ this ->parentClass ($ group , $ option , $ buyRequest , $ product );
15521556
15531557 $ product ->expects ($ this ->any ())
@@ -1556,6 +1560,8 @@ public function testPrepareForCartAdvancedSpecifyProductOptions()
15561560 $ buyRequest ->expects ($ this ->once ())
15571561 ->method ('getBundleOption ' )
15581562 ->willReturn ([0 , '' , 'str ' ]);
1563+ $ group ->expects ($ this ->once ())
1564+ ->method ('validateUserValue ' );
15591565
15601566 $ result = $ this ->model ->prepareForCartAdvanced ($ buyRequest , $ product );
15611567 $ this ->assertEquals ('Please specify product option(s). ' , $ result );
0 commit comments