File tree Expand file tree Collapse file tree 3 files changed +74
-2
lines changed
Customer/Test/Unit/Controller/Address Expand file tree Collapse file tree 3 files changed +74
-2
lines changed Original file line number Diff line number Diff line change 11
11
use Magento \Customer \Api \Data \RegionInterface ;
12
12
use Magento \Customer \Api \Data \RegionInterfaceFactory ;
13
13
use Magento \Customer \Controller \Address \FormPost ;
14
- use Magento \Customer \Model \CustomerRegistry ;
15
14
use Magento \Customer \Model \Metadata \Form ;
16
15
use Magento \Customer \Model \Metadata \FormFactory ;
17
16
use Magento \Customer \Model \Session ;
20
19
use Magento \Directory \Model \RegionFactory ;
21
20
use Magento \Framework \Api \DataObjectHelper ;
22
21
use Magento \Framework \App \Action \Context ;
23
- use Magento \Framework \App \ObjectManager ;
24
22
use Magento \Framework \App \RequestInterface ;
25
23
use Magento \Framework \App \Response \RedirectInterface ;
26
24
use Magento \Framework \Controller \Result \ForwardFactory ;
Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * Copyright © 2013-2017 Magento, Inc. All rights reserved.
4
+ * See COPYING.txt for license details.
5
+ */
6
+
7
+ /**
8
+ * Country factory
9
+ */
10
+ namespace Magento \Directory \Model ;
11
+
12
+ class CountryFactory
13
+ {
14
+ /**
15
+ * @var \Magento\Framework\ObjectManagerInterface
16
+ */
17
+ protected $ _objectManager ;
18
+
19
+ /**
20
+ * @param \Magento\Framework\ObjectManagerInterface $objectManager
21
+ */
22
+ public function __construct (\Magento \Framework \ObjectManagerInterface $ objectManager )
23
+ {
24
+ $ this ->_objectManager = $ objectManager ;
25
+ }
26
+
27
+ /**
28
+ * Create new country model
29
+ *
30
+ * @param array $arguments
31
+ * @return \Magento\Directory\Model\Country
32
+ */
33
+ public function create (array $ arguments = [])
34
+ {
35
+ return $ this ->_objectManager ->create (\Magento \Directory \Model \Country::class, $ arguments , false );
36
+ }
37
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * Copyright © 2013-2017 Magento, Inc. All rights reserved.
4
+ * See COPYING.txt for license details.
5
+ */
6
+
7
+ /**
8
+ * Region factory
9
+ */
10
+ namespace Magento \Directory \Model ;
11
+
12
+ class RegionFactory
13
+ {
14
+ /**
15
+ * @var \Magento\Framework\ObjectManagerInterface
16
+ */
17
+ protected $ _objectManager ;
18
+
19
+ /**
20
+ * @param \Magento\Framework\ObjectManagerInterface $objectManager
21
+ */
22
+ public function __construct (\Magento \Framework \ObjectManagerInterface $ objectManager )
23
+ {
24
+ $ this ->_objectManager = $ objectManager ;
25
+ }
26
+
27
+ /**
28
+ * Create new region model
29
+ *
30
+ * @param array $arguments
31
+ * @return \Magento\Directory\Model\Region
32
+ */
33
+ public function create (array $ arguments = [])
34
+ {
35
+ return $ this ->_objectManager ->create (\Magento \Directory \Model \Region::class, $ arguments );
36
+ }
37
+ }
You can’t perform that action at this time.
0 commit comments