File tree Expand file tree Collapse file tree 1 file changed +52
-0
lines changed
app/code/Magento/Sales/Test/Unit/Model/Order Expand file tree Collapse file tree 1 file changed +52
-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
+ declare (strict_types=1 );
7
+
8
+ namespace Magento \Sales \Test \Unit \Model \Order ;
9
+
10
+ use Magento \Sales \Model \OrderFactory ;
11
+ use Magento \Sales \Api \Data \ShippingInterfaceFactory ;
12
+ use Magento \Sales \Api \Data \TotalInterfaceFactory ;
13
+ use Magento \Sales \Model \Order \ShippingBuilder ;
14
+ use PHPUnit \Framework \MockObject \MockObject ;
15
+ use PHPUnit \Framework \TestCase ;
16
+
17
+ class ShippingBuilderTest extends TestCase
18
+ {
19
+ /**
20
+ * @var ShippingBuilder
21
+ */
22
+ private $ shippingBuilder ;
23
+
24
+ /**
25
+ * @var OrderFactory|MockObject
26
+ */
27
+ private $ orderFactory ;
28
+
29
+ /**
30
+ * @var ShippingInterfaceFactory|Mockobject
31
+ */
32
+ private $ shippingFactory ;
33
+
34
+ /**
35
+ * @var TotalInterfaceFactory|MockObject
36
+ */
37
+ private $ totalFactory ;
38
+
39
+ /**
40
+ * @return void
41
+ */
42
+ protected function setUp (): void
43
+ {
44
+ $ this ->orderFactory = $ this ->getMockBuilder (OrderFactory::class)
45
+ ->getMock ();
46
+ $ this ->shippingFactory = $ this ->getMockBuilder (ShippingInterfaceFactory::class)
47
+ ->getMock ();
48
+ $ this ->totalFactory = $ this ->getMockBuilder (TotalInterfaceFactory::class)
49
+ ->getMock ();
50
+ $ this ->shippingBuilder = new ShippingBuilder ($ this ->orderFactory , $ this ->shippingFactory , $ this ->totalFactory );
51
+ }
52
+ }
You can’t perform that action at this time.
0 commit comments