/** * @throws \Maatwebsite\Clerk\Exceptions\DriverNotFoundException * @return \Maatwebsite\Clerk\Writer */ public function initWriter() { $writer = WriterFactory::create($this->getDriver('writer'), $this->getFormat(), $this->getExtension(), $this->getWorkbook()); return $writer; }
public function test_factory_returns_exception_when_trying_to_use_it_without_sheets() { $this->setExpectedException('Maatwebsite\\Clerk\\Exceptions\\ExportFailedException'); $workbook = new Workbook('mock'); WriterFactory::create(new PHPExcel('drivers.writer.excel2003'), 'Excel5', 'xls', $workbook); }