|
13 | 13 | use Magento\Framework\App\State;
|
14 | 14 | use Magento\Framework\Autoload\ClassLoaderWrapper;
|
15 | 15 | use Magento\Framework\Config\Scope;
|
16 |
| -use Magento\Framework\Exception\LocalizedException; |
17 | 16 | use Magento\Framework\ObjectManagerInterface;
|
18 | 17 | use Magento\Framework\Shell;
|
19 | 18 | use Magento\TestFramework\Application;
|
@@ -83,73 +82,6 @@ public function testConstructor()
|
83 | 82 | );
|
84 | 83 | }
|
85 | 84 |
|
86 |
| - /** |
87 |
| - * Test \Magento\TestFramework\Application will correctly load specified areas. |
88 |
| - */ |
89 |
| - public function testBackEndLoadArea() |
90 |
| - { |
91 |
| - $configScope = $this->getMockBuilder(Scope::class)->disableOriginalConstructor()->getMock(); |
92 |
| - $configScope->expects($this->once())->method('setCurrentScope')->with($this->identicalTo(Area::AREA_ADMINHTML)); |
93 |
| - |
94 |
| - $configLoader = $this->getMockBuilder(ConfigLoader::class)->disableOriginalConstructor()->getMock(); |
95 |
| - $configLoader->expects($this->once()) |
96 |
| - ->method('load') |
97 |
| - ->with($this->identicalTo(Area::AREA_ADMINHTML)) |
98 |
| - ->willReturn([]); |
99 |
| - $areaList = $this->getMockBuilder(AreaList::class)->disableOriginalConstructor()->getMock(); |
100 |
| - |
101 |
| - /** @var ObjectManagerInterface|\PHPUnit_Framework_MockObject_MockObject $objectManager */ |
102 |
| - $objectManager = $this->getMockBuilder(ObjectManagerInterface::class)->disableOriginalConstructor()->getMock(); |
103 |
| - $objectManager->expects($this->once())->method('configure')->with($this->identicalTo([])); |
104 |
| - $objectManager->expects($this->exactly(3)) |
105 |
| - ->method('get') |
106 |
| - ->willReturnOnConsecutiveCalls( |
107 |
| - $configScope, |
108 |
| - $configLoader, |
109 |
| - $areaList |
110 |
| - ); |
111 |
| - |
112 |
| - \Magento\TestFramework\Helper\Bootstrap::setObjectManager($objectManager); |
113 |
| - |
114 |
| - $bootstrap = $this->getMockBuilder(\Magento\TestFramework\Helper\Bootstrap::class) |
115 |
| - ->disableOriginalConstructor() |
116 |
| - ->getMock(); |
117 |
| - $bootstrap->expects($this->once())->method('loadArea')->with($this->identicalTo(Area::AREA_ADMINHTML)); |
118 |
| - \Magento\TestFramework\Helper\Bootstrap::setInstance($bootstrap); |
119 |
| - |
120 |
| - $this->subject->loadArea(Area::AREA_ADMINHTML); |
121 |
| - } |
122 |
| - |
123 |
| - /** |
124 |
| - * Test \Magento\TestFramework\Application will correctly load specified areas. |
125 |
| - */ |
126 |
| - public function testFrontEndLoadArea() |
127 |
| - { |
128 |
| - $configScope = $this->getMockBuilder(Scope::class)->disableOriginalConstructor()->getMock(); |
129 |
| - $configScope->expects($this->once())->method('setCurrentScope')->with($this->identicalTo(Area::AREA_FRONTEND)); |
130 |
| - |
131 |
| - $configLoader = $this->getMockBuilder(ConfigLoader::class)->disableOriginalConstructor()->getMock(); |
132 |
| - $configLoader->expects($this->once()) |
133 |
| - ->method('load') |
134 |
| - ->with($this->identicalTo(Area::AREA_FRONTEND)) |
135 |
| - ->willReturn([]); |
136 |
| - $areaList = $this->getMockBuilder(AreaList::class)->disableOriginalConstructor()->getMock(); |
137 |
| - |
138 |
| - /** @var ObjectManagerInterface|\PHPUnit_Framework_MockObject_MockObject $objectManager */ |
139 |
| - $objectManager = $this->getMockBuilder(ObjectManagerInterface::class)->disableOriginalConstructor()->getMock(); |
140 |
| - $objectManager->expects($this->once())->method('configure')->with($this->identicalTo([])); |
141 |
| - $objectManager->expects($this->exactly(3)) |
142 |
| - ->method('get') |
143 |
| - ->willReturnOnConsecutiveCalls( |
144 |
| - $configScope, |
145 |
| - $configLoader, |
146 |
| - $areaList |
147 |
| - ); |
148 |
| - |
149 |
| - \Magento\TestFramework\Helper\Bootstrap::setObjectManager($objectManager); |
150 |
| - $this->subject->loadArea(Area::AREA_FRONTEND); |
151 |
| - } |
152 |
| - |
153 | 85 | /**
|
154 | 86 | * Test \Magento\TestFramework\Application will correctly load specified areas.
|
155 | 87 | *
|
|
0 commit comments