/** * {@inheritdoc} */ public function open($path, $type = null) { $archive = $this->archiveLoader->open($path); return new $this->spreadsheetClass($archive, $this->relationshipsLoader, $this->sharedStringsLoader, $this->stylesLoader, $this->worksheetListReader, $this->valueTransformerFactory, $this->rowIteratorFactory); }
public function it_caches_spreadsheet_objects(ArchiveLoader $archiveLoader, Archive $archive) { $archiveLoader->open('path')->shouldBeCalledTimes(1)->willReturn($archive); $spreadsheet = $this->open('path'); $spreadsheet->getArchive()->shouldReturn($archive); }