File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
app/code/Magento/ImportExport Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -528,7 +528,8 @@ public function importSource()
528528 $ this ->getErrorAggregator ()->getInvalidRowsCount (),
529529 $ this ->getErrorAggregator ()->getErrorsCount ()
530530 ),
531- __ ('The import was successful. ' ),
531+ $ this ->getForceImport () == '0 ' && $ this ->getErrorAggregator ()->getErrorsCount () > 0 ?
532+ __ ('The import was not successful. ' ) : __ ('The import was successful. ' ),
532533 ]
533534 );
534535 $ this ->importHistoryModel ->updateReport ($ this , true );
Original file line number Diff line number Diff line change @@ -268,6 +268,7 @@ protected function setUp(): void
268268 '_getEntityAdapter '
269269 ]
270270 )
271+ ->addMethods (['getForceImport ' ])
271272 ->getMock ();
272273 $ this ->setPropertyValue ($ this ->import , '_varDirectory ' , $ this ->_varDirectory );
273274 }
@@ -302,6 +303,8 @@ public function testImportSource()
302303 $ this ->import ->expects ($ this ->any ())
303304 ->method ('_getEntityAdapter ' )
304305 ->willReturn ($ this ->_entityAdapter );
306+ $ this ->import ->expects ($ this ->once ())
307+ ->method ('getForceImport ' );
305308 $ this ->_importConfig
306309 ->expects ($ this ->any ())
307310 ->method ('getEntities ' )
You can’t perform that action at this time.
0 commit comments