7
7
8
8
use Magento \Framework \App \DeploymentConfig \ImporterInterface ;
9
9
use Magento \Framework \App \DeploymentConfig ;
10
- use Magento \Framework \Exception \LocalizedException ;
11
10
use Psr \Log \LoggerInterface as Logger ;
12
11
use Magento \Deploy \Console \Command \App \ConfigImport \Importer ;
13
12
use Magento \Deploy \Model \DeploymentConfig \Validator ;
@@ -135,8 +134,8 @@ public function testImport()
135
134
}
136
135
137
136
/**
138
- * @expectedException \Magento\Framework\Exception\LocalizedException
139
- * @expectedExceptionMessage Import is failed. Please see the log report.
137
+ * @expectedException \Magento\Framework\Exception\RuntimeException
138
+ * @expectedExceptionMessage Import is failed: Some error
140
139
*/
141
140
public function testImportWithException ()
142
141
{
@@ -159,28 +158,6 @@ public function testImportWithException()
159
158
$ this ->importer ->import ($ this ->outputMock );
160
159
}
161
160
162
- public function testImportWithLocalizedException ()
163
- {
164
- $ exception = new LocalizedException (__ ('Some error ' ));
165
- $ this ->outputMock ->expects ($ this ->once ())
166
- ->method ('writeln ' )
167
- ->with ('<error>Some error</error> ' );
168
- $ this ->configHashMock ->expects ($ this ->never ())
169
- ->method ('regenerate ' );
170
- $ this ->configValidatorMock ->expects ($ this ->never ())
171
- ->method ('isValid ' );
172
- $ this ->deploymentConfigMock ->expects ($ this ->never ())
173
- ->method ('getConfigData ' );
174
- $ this ->configImporterPoolMock ->expects ($ this ->once ())
175
- ->method ('getImporters ' )
176
- ->willThrowException ($ exception );
177
- $ this ->loggerMock ->expects ($ this ->once ())
178
- ->method ('error ' )
179
- ->with ($ exception );
180
-
181
- $ this ->importer ->import ($ this ->outputMock );
182
- }
183
-
184
161
/**
185
162
* @param array $importers
186
163
* @param bool $isValid
0 commit comments