@@ -342,7 +342,8 @@ public function testPrepareForCartAdvancedWithShoppingCart()
342
342
'getData ' ,
343
343
'getQty ' ,
344
344
'getBundleOption ' ,
345
- 'getBundleOptionQty '
345
+ 'getBundleOptionQty ' ,
346
+ 'getBundleOptionsData ' ,
346
347
]
347
348
)
348
349
->disableOriginalConstructor ()
@@ -496,7 +497,7 @@ function ($key) use ($optionCollection, $selectionCollection) {
496
497
$ selection ->expects ($ this ->once ())
497
498
->method ('getSelectionCanChangeQty ' )
498
499
->willReturn (true );
499
- $ selection ->expects ($ this ->once ( ))
500
+ $ selection ->expects ($ this ->exactly ( 2 ))
500
501
->method ('getSelectionId ' );
501
502
$ selection ->expects ($ this ->once ())
502
503
->method ('addCustomOption ' )
@@ -531,9 +532,9 @@ function ($key) use ($optionCollection, $selectionCollection) {
531
532
532
533
$ this ->arrayUtility ->expects ($ this ->once ())->method ('flatten ' )->willReturn ($ bundleOptions );
533
534
534
- $ buyRequest ->expects ($ this ->once ( ))
535
- ->method ('getBundleOptionQty ' )
536
- ->willReturn ([3 => 5 ]);
535
+ $ buyRequest ->expects ($ this ->exactly ( 2 ))
536
+ ->method ('getBundleOptionsData ' )
537
+ ->willReturn ([3 => [ 3 => 5 ] ]);
537
538
$ priceModel ->expects ($ this ->once ())
538
539
->method ('getSelectionFinalTotalPrice ' )
539
540
->willReturnSelf ();
@@ -586,7 +587,8 @@ public function testPrepareForCartAdvancedEmptyShoppingCart()
586
587
'getData ' ,
587
588
'getQty ' ,
588
589
'getBundleOption ' ,
589
- 'getBundleOptionQty '
590
+ 'getBundleOptionQty ' ,
591
+ 'getBundleOptionsData ' ,
590
592
]
591
593
)
592
594
->disableOriginalConstructor ()
@@ -736,7 +738,7 @@ function ($key) use ($optionCollection, $selectionCollection) {
736
738
$ selection ->expects ($ this ->once ())
737
739
->method ('getSelectionCanChangeQty ' )
738
740
->willReturn (true );
739
- $ selection ->expects ($ this ->once ( ))
741
+ $ selection ->expects ($ this ->exactly ( 2 ))
740
742
->method ('getSelectionId ' );
741
743
$ selection ->expects ($ this ->once ())
742
744
->method ('addCustomOption ' )
@@ -768,9 +770,9 @@ function ($key) use ($optionCollection, $selectionCollection) {
768
770
$ option ->expects ($ this ->once ())
769
771
->method ('getTitle ' )
770
772
->willReturn ('Title for option ' );
771
- $ buyRequest ->expects ($ this ->once ( ))
772
- ->method ('getBundleOptionQty ' )
773
- ->willReturn ([3 => 5 ]);
773
+ $ buyRequest ->expects ($ this ->exactly ( 2 ))
774
+ ->method ('getBundleOptionsData ' )
775
+ ->willReturn ([3 => [ 3 => 5 ] ]);
774
776
$ priceModel ->expects ($ this ->once ())
775
777
->method ('getSelectionFinalTotalPrice ' )
776
778
->willReturnSelf ();
@@ -811,7 +813,8 @@ public function testPrepareForCartAdvancedStringInResult()
811
813
'getData ' ,
812
814
'getQty ' ,
813
815
'getBundleOption ' ,
814
- 'getBundleOptionQty '
816
+ 'getBundleOptionQty ' ,
817
+ 'getBundleOptionsData ' ,
815
818
]
816
819
)
817
820
->disableOriginalConstructor ()
@@ -957,7 +960,7 @@ function ($key) use ($optionCollection, $selectionCollection) {
957
960
$ selection ->expects ($ this ->once ())
958
961
->method ('getSelectionCanChangeQty ' )
959
962
->willReturn (true );
960
- $ selection ->expects ($ this ->once ( ))
963
+ $ selection ->expects ($ this ->exactly ( 2 ))
961
964
->method ('getSelectionId ' );
962
965
$ selection ->expects ($ this ->once ())
963
966
->method ('addCustomOption ' )
@@ -992,9 +995,9 @@ function ($key) use ($optionCollection, $selectionCollection) {
992
995
993
996
$ this ->arrayUtility ->expects ($ this ->once ())->method ('flatten ' )->willReturn ($ bundleOptions );
994
997
995
- $ buyRequest ->expects ($ this ->once ( ))
996
- ->method ('getBundleOptionQty ' )
997
- ->willReturn ([3 => 5 ]);
998
+ $ buyRequest ->expects ($ this ->exactly ( 2 ))
999
+ ->method ('getBundleOptionsData ' )
1000
+ ->willReturn ([3 => [ 3 => 5 ] ]);
998
1001
$ priceModel ->expects ($ this ->once ())
999
1002
->method ('getSelectionFinalTotalPrice ' )
1000
1003
->willReturnSelf ();
@@ -1030,7 +1033,8 @@ public function testPrepareForCartAdvancedWithoutSelections()
1030
1033
'getData ' ,
1031
1034
'getQty ' ,
1032
1035
'getBundleOption ' ,
1033
- 'getBundleOptionQty '
1036
+ 'getBundleOptionQty ' ,
1037
+ 'getBundleOptionsData ' ,
1034
1038
]
1035
1039
)
1036
1040
->disableOriginalConstructor ()
@@ -1105,9 +1109,9 @@ function ($key) use ($optionCollection) {
1105
1109
1106
1110
$ bundleOptions = [];
1107
1111
$ buyRequest ->expects ($ this ->once ())->method ('getBundleOption ' )->willReturn ($ bundleOptions );
1108
- $ buyRequest ->expects ($ this ->once ( ))
1109
- ->method ('getBundleOptionQty ' )
1110
- ->willReturn ([3 => 5 ]);
1112
+ $ buyRequest ->expects ($ this ->exactly ( 2 ))
1113
+ ->method ('getBundleOptionsData ' )
1114
+ ->willReturn ([3 => [ 3 => 5 ] ]);
1111
1115
1112
1116
$ this ->arrayUtility ->expects ($ this ->once ())->method ('flatten ' )->willReturn ($ bundleOptions );
1113
1117
0 commit comments