5
5
*/
6
6
namespace Magento \Framework \Interception ;
7
7
8
+ use Magento \Framework \App ;
9
+ use Magento \Framework \Config \Scope ;
10
+ use Magento \Framework \Interception \ObjectManager \Config \Developer ;
11
+ use Magento \Framework \ObjectManager \Definition ;
12
+ use Magento \Framework \ObjectManager \Factory \Dynamic \Developer as DeveloperFactory ;
13
+ use Magento \Framework \ObjectManager \ObjectManager ;
14
+ use Magento \Framework \ObjectManager \Relations ;
15
+ use Magento \Framework \ObjectManagerInterface ;
16
+
8
17
/**
9
18
* Class GeneralTest
10
19
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
@@ -17,12 +26,12 @@ abstract class AbstractPlugin extends \PHPUnit_Framework_TestCase
17
26
protected $ _configReader ;
18
27
19
28
/**
20
- * @var \Magento\Framework\ ObjectManagerInterface
29
+ * @var ObjectManagerInterface
21
30
*/
22
31
protected $ _objectManager ;
23
32
24
33
/**
25
- * @var \Magento\Framework\ ObjectManagerInterface
34
+ * @var ObjectManagerInterface
26
35
*/
27
36
private $ applicationObjectManager ;
28
37
@@ -32,19 +41,19 @@ public function setUp()
32
41
return ;
33
42
}
34
43
35
- $ this ->applicationObjectManager = \ Magento \ Framework \ App \ObjectManager::getInstance ();
36
- \ Magento \ Framework \ App \ObjectManager::setInstance ($ this ->_objectManager );
44
+ $ this ->applicationObjectManager = App \ObjectManager::getInstance ();
45
+ App \ObjectManager::setInstance ($ this ->_objectManager );
37
46
}
38
47
39
48
public function tearDown ()
40
49
{
41
- \ Magento \ Framework \ App \ObjectManager::setInstance ($ this ->applicationObjectManager );
50
+ App \ObjectManager::setInstance ($ this ->applicationObjectManager );
42
51
}
43
52
44
53
public function setUpInterceptionConfig ($ pluginConfig )
45
54
{
46
- $ config = new \ Magento \ Framework \ Interception \ ObjectManager \ Config \ Developer ();
47
- $ factory = new \ Magento \ Framework \ ObjectManager \ Factory \ Dynamic \ Developer ($ config , null );
55
+ $ config = new Developer ();
56
+ $ factory = new DeveloperFactory ($ config , null );
48
57
49
58
$ this ->_configReader = $ this ->getMock ('Magento\Framework\Config\ReaderInterface ' );
50
59
$ this ->_configReader ->expects (
@@ -57,11 +66,11 @@ public function setUpInterceptionConfig($pluginConfig)
57
66
58
67
$ areaList = $ this ->getMock ('Magento\Framework\App\AreaList ' , [], [], '' , false );
59
68
$ areaList ->expects ($ this ->any ())->method ('getCodes ' )->will ($ this ->returnValue ([]));
60
- $ configScope = new \ Magento \ Framework \ Config \ Scope ($ areaList , 'global ' );
69
+ $ configScope = new Scope ($ areaList , 'global ' );
61
70
$ cache = $ this ->getMock ('Magento\Framework\Config\CacheInterface ' );
62
71
$ cache ->expects ($ this ->any ())->method ('load ' )->will ($ this ->returnValue (false ));
63
- $ definitions = new \ Magento \ Framework \ ObjectManager \ Definition \Runtime ();
64
- $ relations = new \ Magento \ Framework \ ObjectManager \ Relations \Runtime ();
72
+ $ definitions = new Definition \Runtime ();
73
+ $ relations = new Relations \Runtime ();
65
74
$ interceptionConfig = new Config \Config (
66
75
$ this ->_configReader ,
67
76
$ configScope ,
@@ -81,7 +90,7 @@ public function setUpInterceptionConfig($pluginConfig)
81
90
'Magento\Framework\ObjectManager\DefinitionInterface ' => $ definitions ,
82
91
'Magento\Framework\Interception\DefinitionInterface ' => $ interceptionDefinitions
83
92
];
84
- $ this ->_objectManager = new \ Magento \ Framework \ ObjectManager \ ObjectManager (
93
+ $ this ->_objectManager = new ObjectManager (
85
94
$ factory ,
86
95
$ config ,
87
96
$ sharedInstances
0 commit comments