@@ -232,7 +232,16 @@ public function testPrepareForCartAdvancedWithoutOptions()
232
232
/** @var MockObject|DataObject $buyRequest */
233
233
$ buyRequest = $ this ->getMockBuilder (DataObject::class)
234
234
->setMethods (
235
- ['__wakeup ' , 'getOptions ' , 'getSuperProductConfig ' , 'unsetData ' , 'getData ' , 'getQty ' , 'getBundleOption ' ]
235
+ [
236
+ '__wakeup ' ,
237
+ 'getOptions ' ,
238
+ 'getSuperProductConfig ' ,
239
+ 'unsetData ' ,
240
+ 'getData ' ,
241
+ 'getQty ' ,
242
+ 'getBundleOption ' ,
243
+ 'getBundleOptionsData ' ,
244
+ ]
236
245
)
237
246
->disableOriginalConstructor ()
238
247
->getMock ();
@@ -497,7 +506,7 @@ function ($key) use ($optionCollection, $selectionCollection) {
497
506
$ selection ->expects ($ this ->once ())
498
507
->method ('getSelectionCanChangeQty ' )
499
508
->willReturn (true );
500
- $ selection ->expects ($ this ->exactly ( 2 ))
509
+ $ selection ->expects ($ this ->once ( ))
501
510
->method ('getSelectionId ' );
502
511
$ selection ->expects ($ this ->once ())
503
512
->method ('addCustomOption ' )
@@ -532,9 +541,9 @@ function ($key) use ($optionCollection, $selectionCollection) {
532
541
533
542
$ this ->arrayUtility ->expects ($ this ->once ())->method ('flatten ' )->willReturn ($ bundleOptions );
534
543
535
- $ buyRequest ->expects ($ this ->exactly ( 2 ))
536
- ->method ('getBundleOptionsData ' )
537
- ->willReturn ([3 => [ 3 => 5 ] ]);
544
+ $ buyRequest ->expects ($ this ->once ( ))
545
+ ->method ('getBundleOptionQty ' )
546
+ ->willReturn ([3 => 5 ]);
538
547
$ priceModel ->expects ($ this ->once ())
539
548
->method ('getSelectionFinalTotalPrice ' )
540
549
->willReturnSelf ();
@@ -738,7 +747,7 @@ function ($key) use ($optionCollection, $selectionCollection) {
738
747
$ selection ->expects ($ this ->once ())
739
748
->method ('getSelectionCanChangeQty ' )
740
749
->willReturn (true );
741
- $ selection ->expects ($ this ->exactly ( 2 ))
750
+ $ selection ->expects ($ this ->once ( ))
742
751
->method ('getSelectionId ' );
743
752
$ selection ->expects ($ this ->once ())
744
753
->method ('addCustomOption ' )
@@ -770,9 +779,9 @@ function ($key) use ($optionCollection, $selectionCollection) {
770
779
$ option ->expects ($ this ->once ())
771
780
->method ('getTitle ' )
772
781
->willReturn ('Title for option ' );
773
- $ buyRequest ->expects ($ this ->exactly ( 2 ))
774
- ->method ('getBundleOptionsData ' )
775
- ->willReturn ([3 => [ 3 => 5 ] ]);
782
+ $ buyRequest ->expects ($ this ->once ( ))
783
+ ->method ('getBundleOptionQty ' )
784
+ ->willReturn ([3 => 5 ]);
776
785
$ priceModel ->expects ($ this ->once ())
777
786
->method ('getSelectionFinalTotalPrice ' )
778
787
->willReturnSelf ();
@@ -960,7 +969,7 @@ function ($key) use ($optionCollection, $selectionCollection) {
960
969
$ selection ->expects ($ this ->once ())
961
970
->method ('getSelectionCanChangeQty ' )
962
971
->willReturn (true );
963
- $ selection ->expects ($ this ->exactly ( 2 ))
972
+ $ selection ->expects ($ this ->once ( ))
964
973
->method ('getSelectionId ' );
965
974
$ selection ->expects ($ this ->once ())
966
975
->method ('addCustomOption ' )
@@ -995,9 +1004,9 @@ function ($key) use ($optionCollection, $selectionCollection) {
995
1004
996
1005
$ this ->arrayUtility ->expects ($ this ->once ())->method ('flatten ' )->willReturn ($ bundleOptions );
997
1006
998
- $ buyRequest ->expects ($ this ->exactly ( 2 ))
999
- ->method ('getBundleOptionsData ' )
1000
- ->willReturn ([3 => [ 3 => 5 ] ]);
1007
+ $ buyRequest ->expects ($ this ->once ( ))
1008
+ ->method ('getBundleOptionQty ' )
1009
+ ->willReturn ([3 => 5 ]);
1001
1010
$ priceModel ->expects ($ this ->once ())
1002
1011
->method ('getSelectionFinalTotalPrice ' )
1003
1012
->willReturnSelf ();
@@ -1109,9 +1118,9 @@ function ($key) use ($optionCollection) {
1109
1118
1110
1119
$ bundleOptions = [];
1111
1120
$ buyRequest ->expects ($ this ->once ())->method ('getBundleOption ' )->willReturn ($ bundleOptions );
1112
- $ buyRequest ->expects ($ this ->exactly ( 2 ))
1113
- ->method ('getBundleOptionsData ' )
1114
- ->willReturn ([3 => [ 3 => 5 ] ]);
1121
+ $ buyRequest ->expects ($ this ->once ( ))
1122
+ ->method ('getBundleOptionQty ' )
1123
+ ->willReturn ([3 => 5 ]);
1115
1124
1116
1125
$ this ->arrayUtility ->expects ($ this ->once ())->method ('flatten ' )->willReturn ($ bundleOptions );
1117
1126
@@ -1135,7 +1144,16 @@ public function testPrepareForCartAdvancedSelectionsSelectionIdsExists()
1135
1144
/** @var MockObject|DataObject $buyRequest */
1136
1145
$ buyRequest = $ this ->getMockBuilder (DataObject::class)
1137
1146
->setMethods (
1138
- ['__wakeup ' , 'getOptions ' , 'getSuperProductConfig ' , 'unsetData ' , 'getData ' , 'getQty ' , 'getBundleOption ' ]
1147
+ [
1148
+ '__wakeup ' ,
1149
+ 'getOptions ' ,
1150
+ 'getSuperProductConfig ' ,
1151
+ 'unsetData ' ,
1152
+ 'getData ' ,
1153
+ 'getQty ' ,
1154
+ 'getBundleOption ' ,
1155
+ 'getBundleOptionsData ' ,
1156
+ ]
1139
1157
)
1140
1158
->disableOriginalConstructor ()
1141
1159
->getMock ();
@@ -1262,7 +1280,16 @@ public function testPrepareForCartAdvancedSelectRequiredOptions()
1262
1280
/** @var MockObject|DataObject $buyRequest */
1263
1281
$ buyRequest = $ this ->getMockBuilder (DataObject::class)
1264
1282
->setMethods (
1265
- ['__wakeup ' , 'getOptions ' , 'getSuperProductConfig ' , 'unsetData ' , 'getData ' , 'getQty ' , 'getBundleOption ' ]
1283
+ [
1284
+ '__wakeup ' ,
1285
+ 'getOptions ' ,
1286
+ 'getSuperProductConfig ' ,
1287
+ 'unsetData ' ,
1288
+ 'getData ' ,
1289
+ 'getQty ' ,
1290
+ 'getBundleOption ' ,
1291
+ 'getBundleOptionsData ' ,
1292
+ ]
1266
1293
)
1267
1294
->disableOriginalConstructor ()
1268
1295
->getMock ();
@@ -1426,7 +1453,16 @@ public function testPrepareForCartAdvancedAllRequiredOption()
1426
1453
/** @var MockObject|DataObject $buyRequest */
1427
1454
$ buyRequest = $ this ->getMockBuilder (DataObject::class)
1428
1455
->setMethods (
1429
- ['__wakeup ' , 'getOptions ' , 'getSuperProductConfig ' , 'unsetData ' , 'getData ' , 'getQty ' , 'getBundleOption ' ]
1456
+ [
1457
+ '__wakeup ' ,
1458
+ 'getOptions ' ,
1459
+ 'getSuperProductConfig ' ,
1460
+ 'unsetData ' ,
1461
+ 'getData ' ,
1462
+ 'getQty ' ,
1463
+ 'getBundleOption ' ,
1464
+ 'getBundleOptionsData ' ,
1465
+ ]
1430
1466
)
1431
1467
->disableOriginalConstructor ()
1432
1468
->getMock ();
@@ -1527,7 +1563,16 @@ public function testPrepareForCartAdvancedSpecifyProductOptions()
1527
1563
/** @var MockObject|DataObject $buyRequest */
1528
1564
$ buyRequest = $ this ->getMockBuilder (DataObject::class)
1529
1565
->setMethods (
1530
- ['__wakeup ' , 'getOptions ' , 'getSuperProductConfig ' , 'unsetData ' , 'getData ' , 'getQty ' , 'getBundleOption ' ]
1566
+ [
1567
+ '__wakeup ' ,
1568
+ 'getOptions ' ,
1569
+ 'getSuperProductConfig ' ,
1570
+ 'unsetData ' ,
1571
+ 'getData ' ,
1572
+ 'getQty ' ,
1573
+ 'getBundleOption ' ,
1574
+ 'getBundleOptionsData ' ,
1575
+ ]
1531
1576
)
1532
1577
->disableOriginalConstructor ()
1533
1578
->getMock ();
0 commit comments