tempfile !== '') { unlink($this->tempfile); $this->tempfile = ''; } } public function testEmptyFileLoad(): void { $this->expectException(ReaderException::class); $this->expectExceptionMessage('Could not find zip member'); $this->tempfile = $temp = File::temporaryFileName(); file_put_contents($temp, ''); $reader = new Xlsx(); $reader->load($temp); } public function testEmptyFileNames(): void { $this->expectException(ReaderException::class); $this->expectExceptionMessage('Could not find zip member'); $this->tempfile = $temp = File::temporaryFileName(); file_put_contents($temp, ''); $reader = new Xlsx(); $reader->listWorksheetNames($temp); } public function testEmptyInfo(): void { $this->expectException(ReaderException::class); $this->expectExceptionMessage('Could not find zip member'); $this->tempfile = $temp = File::temporaryFileName(); file_put_contents($temp, ''); $reader = new Xlsx(); $reader->listWorksheetInfo($temp); } }