File tree 1 file changed +46
-0
lines changed
dev/tests/integration/testsuite/Magento/Quote/Model/Quote/Address
1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * Copyright © Magento, Inc. All rights reserved.
4
+ * See COPYING.txt for license details.
5
+ */
6
+
7
+ namespace Magento \Quote \Model \Quote \Address ;
8
+
9
+ use PHPUnit \Framework \TestCase ;
10
+ use Magento \TestFramework \Helper \Bootstrap ;
11
+
12
+ class ConverterTest extends TestCase
13
+ {
14
+ /**
15
+ * @var \Magento\Framework\ObjectManagerInterface
16
+ */
17
+ private $ objectManager ;
18
+
19
+ /**
20
+ * @var \Magento\Framework\DataObject\Copy
21
+ */
22
+ private $ objectCopyService ;
23
+
24
+ protected function setUp ()
25
+ {
26
+ $ this ->objectManager = Bootstrap::getObjectManager ();
27
+ $ this ->objectCopyService = $ this ->objectManager ->create (\Magento \Framework \DataObject \Copy::class);
28
+ }
29
+
30
+ public function testThatFieldBaseShippingDiscountTaxCompensationAmountPresentInOrderAddress ()
31
+ {
32
+ $ amountValue = 999.99 ;
33
+ /** @var \Magento\Quote\Model\Quote\Address $quoteAddress */
34
+ $ quoteAddress = $ this ->objectManager ->create (\Magento \Quote \Model \Quote \Address::class);
35
+ $ quoteAddress ->setBaseShippingDiscountTaxCompensationAmount ($ amountValue );
36
+
37
+ $ orderAddressData = $ this ->objectCopyService ->getDataFromFieldset (
38
+ 'sales_convert_quote_address ' ,
39
+ 'to_order ' ,
40
+ $ quoteAddress
41
+ );
42
+
43
+ $ this ->assertArrayHasKey ('base_shipping_discount_tax_compensation_amnt ' , $ orderAddressData );
44
+ $ this ->assertEquals ($ amountValue , $ orderAddressData ['base_shipping_discount_tax_compensation_amnt ' ]);
45
+ }
46
+ }
You can’t perform that action at this time.
0 commit comments