Skip to content

Commit e4255ec

Browse files
committed
Fixed for static tests
1 parent 41562d0 commit e4255ec

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

app/code/Magento/ImportExport/Test/Unit/Controller/Adminhtml/Export/File/DeleteTest.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ protected function setUp()
122122
->method('getMessageManager')
123123
->willReturn($this->messageManagerMock);
124124

125-
126125
$this->objectManagerHelper = new ObjectManagerHelper($this);
127126
$this->deleteControllerMock = $this->objectManagerHelper->getObject(
128127
Delete::class,
@@ -143,7 +142,9 @@ public function testExecuteSuccess()
143142
->with('filename')
144143
->willReturn('sampleFile');
145144

146-
$this->fileSystemMock->expects($this->once())->method('getDirectoryRead')->will($this->returnValue($this->directoryMock));
145+
$this->fileSystemMock->expects($this->once())
146+
->method('getDirectoryRead')
147+
->will($this->returnValue($this->directoryMock));
147148
$this->directoryMock->expects($this->once())->method('isFile')->willReturn(true);
148149
$this->fileMock->expects($this->once())->method('deleteFile')->willReturn(true);
149150
$this->messageManagerMock->expects($this->once())->method('addSuccessMessage');
@@ -160,7 +161,9 @@ public function testExecuteFileDoesntExists()
160161
->with('filename')
161162
->willReturn('sampleFile');
162163

163-
$this->fileSystemMock->expects($this->once())->method('getDirectoryRead')->will($this->returnValue($this->directoryMock));
164+
$this->fileSystemMock->expects($this->once())
165+
->method('getDirectoryRead')
166+
->will($this->returnValue($this->directoryMock));
164167
$this->directoryMock->expects($this->once())->method('isFile')->willReturn(false);
165168
$this->messageManagerMock->expects($this->once())->method('addErrorMessage');
166169

app/code/Magento/ImportExport/Test/Unit/Controller/Adminhtml/Export/File/DownloadTest.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,9 @@ public function testExecuteSuccess()
151151
->with('filename')
152152
->willReturn('sampleFile.csv');
153153

154-
$this->fileSystemMock->expects($this->once())->method('getDirectoryRead')->will($this->returnValue($this->directoryMock));
154+
$this->fileSystemMock->expects($this->once())
155+
->method('getDirectoryRead')
156+
->will($this->returnValue($this->directoryMock));
155157
$this->directoryMock->expects($this->once())->method('isFile')->willReturn(true);
156158
$this->fileFactoryMock->expects($this->once())->method('create');
157159

@@ -167,7 +169,9 @@ public function testExecuteFileDoesntExists()
167169
->with('filename')
168170
->willReturn('sampleFile');
169171

170-
$this->fileSystemMock->expects($this->once())->method('getDirectoryRead')->will($this->returnValue($this->directoryMock));
172+
$this->fileSystemMock->expects($this->once())
173+
->method('getDirectoryRead')
174+
->will($this->returnValue($this->directoryMock));
171175
$this->directoryMock->expects($this->once())->method('isFile')->willReturn(false);
172176
$this->messageManagerMock->expects($this->once())->method('addErrorMessage');
173177

0 commit comments

Comments
 (0)