@@ -51,7 +51,8 @@ public function testCreateSimple()
51
51
{
52
52
$ expectedConfig = $ this ->getSimpleConfig ();
53
53
54
- $ requestedType = 'Magento\Framework\ObjectManager\Factory\Fixture\Compiled\SimpleClassTesting ' ;
54
+ $ requestedType = 'requestedType ' ;
55
+ $ type = 'Magento\Framework\ObjectManager\Factory\Fixture\Compiled\SimpleClassTesting ' ;
55
56
$ sharedType = 'Magento\Framework\ObjectManager\Factory\Fixture\Compiled\DependencySharedTesting ' ;
56
57
$ nonSharedType = 'Magento\Framework\ObjectManager\Factory\Fixture\Compiled\DependencyTesting ' ;
57
58
@@ -64,6 +65,15 @@ public function testCreateSimple()
64
65
[$ nonSharedType , null ]
65
66
]
66
67
);
68
+ $ this ->config ->expects ($ this ->any ())
69
+ ->method ('getInstanceType ' )
70
+ ->willReturnMap (
71
+ [
72
+ [$ requestedType , $ type ],
73
+ [$ sharedType , $ sharedType ],
74
+ [$ nonSharedType , $ nonSharedType ]
75
+ ]
76
+ );
67
77
68
78
$ this ->factory ->setArguments (
69
79
[
@@ -90,7 +100,8 @@ public function testCreateSimpleConfiguredArguments()
90
100
{
91
101
$ expectedConfig = $ this ->getSimpleNestedConfig ();
92
102
93
- $ requestedType = 'Magento\Framework\ObjectManager\Factory\Fixture\Compiled\SimpleClassTesting ' ;
103
+ $ type = 'Magento\Framework\ObjectManager\Factory\Fixture\Compiled\SimpleClassTesting ' ;
104
+ $ requestedType = 'requestedType ' ;
94
105
$ sharedType = 'Magento\Framework\ObjectManager\Factory\Fixture\Compiled\DependencySharedTesting ' ;
95
106
$ nonSharedType = 'Magento\Framework\ObjectManager\Factory\Fixture\Compiled\DependencyTesting ' ;
96
107
@@ -103,6 +114,15 @@ public function testCreateSimpleConfiguredArguments()
103
114
[$ nonSharedType , null ]
104
115
]
105
116
);
117
+ $ this ->config ->expects ($ this ->any ())
118
+ ->method ('getInstanceType ' )
119
+ ->willReturnMap (
120
+ [
121
+ [$ requestedType , $ type ],
122
+ [$ sharedType , $ sharedType ],
123
+ [$ nonSharedType , $ nonSharedType ]
124
+ ]
125
+ );
106
126
107
127
$ this ->factory ->setArguments (
108
128
[
0 commit comments