File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
app/code/Magento/ImportExport Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -111,11 +111,13 @@ public function getReportAbsolutePath($fileName)
111
111
* Retrieve report file size
112
112
*
113
113
* @param string $filename
114
- * @return int|mixed
114
+ * @return int|null
115
115
*/
116
116
public function getReportSize ($ filename )
117
117
{
118
- return $ this ->varDirectory ->stat ($ this ->getFilePath ($ filename ))['size ' ];
118
+ $ statResult = $ this ->varDirectory ->stat ($ this ->getFilePath ($ filename ));
119
+
120
+ return $ statResult ['size ' ] ?? null ;
119
121
}
120
122
121
123
/**
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ protected function setUp(): void
93
93
$ this ->varDirectory ->expects ($ this ->any ())->method ('getRelativePath ' )->willReturn ('path ' );
94
94
$ this ->varDirectory ->expects ($ this ->any ())->method ('readFile ' )->willReturn ('contents ' );
95
95
$ this ->varDirectory ->expects ($ this ->any ())->method ('isFile ' )->willReturn (true );
96
- $ this ->varDirectory ->expects ($ this ->any ())->method ('stat ' )->willReturn (100 );
96
+ $ this ->varDirectory ->expects ($ this ->any ())->method ('stat ' )->willReturn (false );
97
97
$ this ->filesystem ->expects ($ this ->any ())->method ('getDirectoryWrite ' )->willReturn ($ this ->varDirectory );
98
98
$ this ->objectManagerHelper = new ObjectManagerHelper ($ this );
99
99
$ this ->report = $ this ->objectManagerHelper ->getObject (
You can’t perform that action at this time.
0 commit comments