Skip to content

Commit a42c301

Browse files
AC-15182: PHPUnit 12 Upgrade
1 parent d315ce6 commit a42c301

File tree

1 file changed

+160
-0
lines changed

1 file changed

+160
-0
lines changed
Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
<?php
2+
declare(strict_types=1);
3+
4+
namespace Magento\Quote\Test\Unit\Helper;
5+
6+
use Magento\Quote\Model\Quote\Address;
7+
8+
/**
9+
* Test helper for Address to support tax and shipping amount operations
10+
*/
11+
class AddressTestHelper extends Address
12+
{
13+
/**
14+
* @var array
15+
*/
16+
private $data = [];
17+
18+
/**
19+
* Skip parent constructor to avoid dependency injection issues
20+
*/
21+
public function __construct()
22+
{
23+
// Skip parent constructor
24+
}
25+
26+
/**
27+
* Get base tax amount
28+
*
29+
* @return float
30+
*/
31+
public function getBaseTaxAmount()
32+
{
33+
return $this->data['baseTaxAmount'] ?? 0;
34+
}
35+
36+
/**
37+
* Set base tax amount
38+
*
39+
* @param float $value
40+
* @return $this
41+
*/
42+
public function setBaseTaxAmount($value)
43+
{
44+
$this->data['baseTaxAmount'] = $value;
45+
return $this;
46+
}
47+
48+
/**
49+
* Get tax amount
50+
*
51+
* @return float
52+
*/
53+
public function getTaxAmount()
54+
{
55+
return $this->data['taxAmount'] ?? 0;
56+
}
57+
58+
/**
59+
* Set tax amount
60+
*
61+
* @param float $value
62+
* @return $this
63+
*/
64+
public function setTaxAmount($value)
65+
{
66+
$this->data['taxAmount'] = $value;
67+
return $this;
68+
}
69+
70+
/**
71+
* Get shipping tax amount
72+
*
73+
* @return float
74+
*/
75+
public function getShippingTaxAmount()
76+
{
77+
return $this->data['shippingTaxAmount'] ?? 0;
78+
}
79+
80+
/**
81+
* Set shipping tax amount
82+
*
83+
* @param float $value
84+
* @return $this
85+
*/
86+
public function setShippingTaxAmount($value)
87+
{
88+
$this->data['shippingTaxAmount'] = $value;
89+
return $this;
90+
}
91+
92+
/**
93+
* Get base shipping tax amount
94+
*
95+
* @return float
96+
*/
97+
public function getBaseShippingTaxAmount()
98+
{
99+
return $this->data['baseShippingTaxAmount'] ?? 0;
100+
}
101+
102+
/**
103+
* Set base shipping tax amount
104+
*
105+
* @param float $value
106+
* @return $this
107+
*/
108+
public function setBaseShippingTaxAmount($value)
109+
{
110+
$this->data['baseShippingTaxAmount'] = $value;
111+
return $this;
112+
}
113+
114+
/**
115+
* Get shipping amount
116+
*
117+
* @return float
118+
*/
119+
public function getShippingAmount()
120+
{
121+
return $this->data['shippingAmount'] ?? 0;
122+
}
123+
124+
/**
125+
* Set shipping amount
126+
*
127+
* @param float $value
128+
* @param bool $alreadyExclTax
129+
* @return $this
130+
*/
131+
public function setShippingAmount($value, $alreadyExclTax = false)
132+
{
133+
$this->data['shippingAmount'] = $value;
134+
return $this;
135+
}
136+
137+
/**
138+
* Get base shipping amount
139+
*
140+
* @return float
141+
*/
142+
public function getBaseShippingAmount()
143+
{
144+
return $this->data['baseShippingAmount'] ?? 0;
145+
}
146+
147+
/**
148+
* Set base shipping amount
149+
*
150+
* @param float $value
151+
* @param bool $alreadyExclTax
152+
* @return $this
153+
*/
154+
public function setBaseShippingAmount($value, $alreadyExclTax = false)
155+
{
156+
$this->data['baseShippingAmount'] = $value;
157+
return $this;
158+
}
159+
}
160+

0 commit comments

Comments
 (0)