@@ -448,18 +448,21 @@ private function verifySelectAllOptions(
448
448
array $ optionsDefault
449
449
): Table {
450
450
$ collectionFactory = $ this ->getMockBuilder (CollectionFactory::class)
451
- ->addMethods (
451
+ /* ->addMethods(
452
452
[
453
453
'setPositionOrder', 'setAttributeFilter', 'addFieldToFilter',
454
454
'setStoreFilter', 'load', 'toOptionArray'
455
455
]
456
- )
456
+ )*/
457
457
->onlyMethods (['create ' ])
458
458
->disableOriginalConstructor ()
459
459
->getMock ();
460
460
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
+ ])
463
466
->disableOriginalConstructor ()
464
467
->getMock ();
465
468
@@ -486,21 +489,21 @@ private function verifySelectAllOptions(
486
489
487
490
$ collectionFactory ->expects ($ this ->once ())
488
491
->method ('create ' )
489
- ->willReturnSelf ( );
490
- $ collectionFactory ->expects ($ this ->once ())
492
+ ->willReturn ( $ attributeOptionCollectionMock );
493
+ $ attributeOptionCollectionMock ->expects ($ this ->once ())
491
494
->method ('setPositionOrder ' )
492
495
->willReturnSelf ();
493
- $ collectionFactory ->expects ($ this ->once ())
496
+ $ attributeOptionCollectionMock ->expects ($ this ->once ())
494
497
->method ('setAttributeFilter ' )
495
498
->with ($ attributeId )
496
499
->willReturnSelf ();
497
- $ collectionFactory ->expects ($ this ->once ())
500
+ $ attributeOptionCollectionMock ->expects ($ this ->once ())
498
501
->method ('setStoreFilter ' )
499
502
->with ($ storeId )
500
503
->willReturnSelf ();
501
- $ collectionFactory ->expects ($ this ->once ())
504
+ $ attributeOptionCollectionMock ->expects ($ this ->once ())
502
505
->method ('load ' )
503
- ->willReturn ( $ attributeOptionCollectionMock );
506
+ ->willReturnSelf ( );
504
507
$ attributeOptionCollectionMock ->expects ($ this ->any ())
505
508
->method ('toOptionArray ' )
506
509
->willReturnMap (
0 commit comments