PluginProbe
Packeta / 2.0.9
Packeta v2.0.9
2.3.2 2.3.1 trunk 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.3.0 1.3.1 1.3.2 1.4 1.4.1 1.4.2 1.4.3 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 All 56 releases
← All changes | tests/Core/DummyFactory.php +5 -100 2.3.22.0.9 View file →
@@ -15,14 +15,10 @@
15 15 use Packetery\Core\Entity\Size;
16 16 use Packetery\Core\PickupPointProvider\VendorProvider;
17 17
18 18 class DummyFactory {
19 - public static function createAddress( ?string $houseNumber = null, ?string $county = null ): Address {
20 - $address = new Address( 'Dummy street', 'Dummy city', '123 45' );
21 - $address->setHouseNumber( $houseNumber );
22 - $address->setCounty( $county );
23 -
24 - return $address;
19 + public static function createAddress(): Address {
20 + return new Address( 'Dummy street', 'Dummy city', '123 45' );
25 21 }
26 22
27 23 public static function createInvalidAddress(): Address {
28 24 return new Address( null, 'Dummy city', '123 45' );
@@ -61,50 +57,8 @@
61 57
62 58 return $order;
63 59 }
64 60
65 - public static function createCarrierCzzpoint(): Carrier {
66 - return new Carrier(
67 - 'czzpoint',
68 - 'czzpoint',
69 - true,
70 - false,
71 - false,
72 - false,
73 - true,
74 - true,
75 - false,
76 - true,
77 - 'cz',
78 - 'CZK',
79 - 30.0,
80 - true,
81 - false,
82 - true
83 - );
84 - }
85 -
86 - public static function createCarrierZpointcz(): Carrier {
87 - return new Carrier(
88 - 'zpointcz',
89 - 'zpointcz',
90 - true,
91 - false,
92 - false,
93 - false,
94 - true,
95 - true,
96 - false,
97 - true,
98 - 'cz',
99 - 'CZK',
100 - 30.0,
101 - true,
102 - false,
103 - true
104 - );
105 - }
106 -
107 61 public static function createCarrierCzechPp(): Carrier {
108 62 return new Carrier(
109 63 'zpoint-cz',
110 64 'zpoint-cz',
@@ -118,11 +72,10 @@
118 72 true,
119 73 'cz',
120 74 'CZK',
121 75 5.0,
76 + false,
122 77 true,
123 - false,
124 - true
125 78 );
126 79 }
127 80
128 81 public static function createCarrierSlovakPp(): Carrier {
@@ -139,11 +92,10 @@
139 92 true,
140 93 'sk',
141 94 'EUR',
142 95 5.0,
96 + false,
143 97 true,
144 - false,
145 - true
146 98 );
147 99 }
148 100
149 101 public static function createCarDeliveryCarrier(): Carrier {
@@ -160,11 +112,10 @@
160 112 false,
161 113 'cz',
162 114 'CZK',
163 115 5.0,
164 - true,
165 116 false,
166 - false
117 + false,
167 118 );
168 119 }
169 120
170 121 public static function createCarrierCzechHdRequiresSize(): Carrier {
@@ -181,60 +132,16 @@
181 132 true,
182 133 'cz',
183 134 'CZK',
184 135 5.0,
185 - true,
186 - true,
187 - true
188 - );
189 - }
190 -
191 - public static function createCarrierGermanHd(): Carrier {
192 - return new Carrier(
193 - '6373',
194 - 'DE Hermes HD',
195 136 false,
196 137 true,
197 - false,
198 - false,
199 - true,
200 - true,
201 - true,
202 - true,
203 - 'de',
204 - 'EUR',
205 - 30.0,
206 - true,
207 - false,
208 - true
209 138 );
210 139 }
211 140
212 - public static function createCarrierGermanPp(): Carrier {
213 - return new Carrier(
214 - '6828',
215 - 'DE Hermes PP',
216 - true,
217 - true,
218 - false,
219 - false,
220 - true,
221 - true,
222 - true,
223 - true,
224 - 'de',
225 - 'EUR',
226 - 30.0,
227 - true,
228 - false,
229 - true
230 - );
231 - }
232 -
233 141 public static function createPickupPoint(): PickupPoint {
234 142 return new PickupPoint(
235 143 '123456',
236 - 'Dummy Place',
237 144 'Dummy PP',
238 145 'Dummy city',
239 146 '123 45',
240 147 'Dummy street',
@@ -282,10 +189,8 @@
282 189
283 190 public static function getEmptyPickupPointValidateRequest(): PickupPointValidateRequest {
284 191 return new PickupPointValidateRequest(
285 192 'dummyPointId',
286 - null,
287 - null,
288 193 null,
289 194 null,
290 195 null,
291 196 null,