@@ -448,18 +448,21 @@ private function verifySelectAllOptions(
448448 array $ optionsDefault
449449 ): Table {
450450 $ collectionFactory = $ this ->getMockBuilder (CollectionFactory::class)
451- ->addMethods (
451+ /* ->addMethods(
452452 [
453453 'setPositionOrder', 'setAttributeFilter', 'addFieldToFilter',
454454 'setStoreFilter', 'load', 'toOptionArray'
455455 ]
456- )
456+ )*/
457457 ->onlyMethods (['create ' ])
458458 ->disableOriginalConstructor ()
459459 ->getMock ();
460460
461- $ attributeOptionCollectionMock = $ this ->getMockBuilder (AttributeOptionCollection::class)
462- ->onlyMethods (['toOptionArray ' ])
461+ $ attributeOptionCollectionMock = $ this ->getMockBuilder (AttributeOptionCollection::class)
462+ ->onlyMethods ([
463+ 'setPositionOrder ' , 'setAttributeFilter ' , 'addFieldToFilter ' ,
464+ 'setStoreFilter ' , 'load ' , 'toOptionArray '
465+ ])
463466 ->disableOriginalConstructor ()
464467 ->getMock ();
465468
@@ -486,21 +489,21 @@ private function verifySelectAllOptions(
486489
487490 $ collectionFactory ->expects ($ this ->once ())
488491 ->method ('create ' )
489- ->willReturnSelf ( );
490- $ collectionFactory ->expects ($ this ->once ())
492+ ->willReturn ( $ attributeOptionCollectionMock );
493+ $ attributeOptionCollectionMock ->expects ($ this ->once ())
491494 ->method ('setPositionOrder ' )
492495 ->willReturnSelf ();
493- $ collectionFactory ->expects ($ this ->once ())
496+ $ attributeOptionCollectionMock ->expects ($ this ->once ())
494497 ->method ('setAttributeFilter ' )
495498 ->with ($ attributeId )
496499 ->willReturnSelf ();
497- $ collectionFactory ->expects ($ this ->once ())
500+ $ attributeOptionCollectionMock ->expects ($ this ->once ())
498501 ->method ('setStoreFilter ' )
499502 ->with ($ storeId )
500503 ->willReturnSelf ();
501- $ collectionFactory ->expects ($ this ->once ())
504+ $ attributeOptionCollectionMock ->expects ($ this ->once ())
502505 ->method ('load ' )
503- ->willReturn ( $ attributeOptionCollectionMock );
506+ ->willReturnSelf ( );
504507 $ attributeOptionCollectionMock ->expects ($ this ->any ())
505508 ->method ('toOptionArray ' )
506509 ->willReturnMap (
0 commit comments