This repository was archived by the owner on Apr 29, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed
dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -37,8 +37,10 @@ public function getOptionPriceByPriceCode(
37
37
if ($ optionValue ->getPriceType () === ProductOptionValue::TYPE_PERCENT ) {
38
38
$ basePrice = $ optionValue ->getOption ()->getProduct ()->getPriceInfo ()->getPrice ($ priceCode )->getValue ();
39
39
$ price = $ basePrice * ($ optionValue ->getData (ProductOptionValue::KEY_PRICE ) / 100 );
40
+
40
41
return $ price ;
41
42
}
43
+
42
44
return $ optionValue ->getData (ProductOptionValue::KEY_PRICE );
43
45
}
44
46
}
Original file line number Diff line number Diff line change @@ -1414,12 +1414,12 @@ public function testGetFinalPricePreset()
1414
1414
$ productTypePriceMock ->expects ($ this ->any ())
1415
1415
->method ('getFinalPrice ' )
1416
1416
->with ($ qty , $ this ->model )
1417
- ->will ( $ this -> returnValue ( $ finalPrice) );
1417
+ ->willReturn ( $ finalPrice );
1418
1418
1419
1419
$ this ->productTypeInstanceMock ->expects ($ this ->any ())
1420
1420
->method ('priceFactory ' )
1421
1421
->with ($ this ->model ->getTypeId ())
1422
- ->will ( $ this -> returnValue ( $ productTypePriceMock) );
1422
+ ->willReturn ( $ productTypePriceMock );
1423
1423
1424
1424
$ this ->assertEquals ($ finalPrice , $ this ->model ->getFinalPrice ($ qty ));
1425
1425
}
Original file line number Diff line number Diff line change @@ -36,16 +36,16 @@ class Price extends \Magento\Catalog\Test\Block\AbstractPriceBlock
36
36
'selector ' => '.price-to .price ' ,
37
37
],
38
38
'price_excluding_tax ' => [
39
- 'selector ' => '.price-excluding-tax .price '
39
+ 'selector ' => '.price-excluding-tax .price ' ,
40
40
],
41
41
'price_including_tax ' => [
42
- 'selector ' => '.price-including-tax .price '
42
+ 'selector ' => '.price-including-tax .price ' ,
43
43
],
44
44
'old_price_from ' => [
45
- 'selector ' => '.price-from .old-price .price-wrapper '
45
+ 'selector ' => '.price-from .old-price .price-wrapper ' ,
46
46
],
47
47
'old_price_to ' => [
48
- 'selector ' => '.price-to .old-price .price-wrapper '
48
+ 'selector ' => '.price-to .old-price .price-wrapper ' ,
49
49
],
50
50
];
51
51
You can’t perform that action at this time.
0 commit comments