22 $this->csvMock = $this->createMock(\
Magento\Framework\File\Csv::class);
24 $this->writer = $this->getMockForAbstractClass(
26 [
'writer' => $this->csvMock]
32 $options = [
'report_filename' =>
'some_filename'];
33 $configMock = $this->createMock(\
Magento\
Setup\
Module\Dependency\Report\Data\ConfigInterface::class);
34 $preparedData = [
'foo',
'baz',
'bar'];
36 $this->writer->expects(
43 $this->returnValue($preparedData)
45 $this->csvMock->expects($this->once())->method(
'saveData')->with(
$options[
'report_filename'], $preparedData);
47 $this->writer->write(
$options, $configMock);
58 $configMock = $this->createMock(\
Magento\
Setup\
Module\Dependency\Report\Data\ConfigInterface::class);
60 $this->writer->write(
$options, $configMock);
69 [[
'report_filename' =>
'']],
70 [[
'there_are_no_report_filename' =>
'some_name']]
testWriteWithWrongOptionReportFilename($options)
dataProviderWrongOptionReportFilename()